.\" -*- nroff -*- .\" Generated file - DO NOT EDIT! .TH CoCreateInstance 3w "Oct 2012" "Wine API" "Wine API" .SH NAME \fBCoCreateInstance\fR (OLE32.@) .SH SYNOPSIS HRESULT CoCreateInstance ( REFCLSID \fIrclsid\fR, LPUNKNOWN \fIpUnkOuter\fR, DWORD \fIdwClsContext\fR, REFIID \fIiid\fR, LPVOID* \fIppv\fR ) .SH DESCRIPTION .PP Creates an instance of the specified class. .SH PARAMS \fIrclsid\fR \fB[In]\fR Class Id to create an instance of. .PP \fIpUnkOuter\fR \fB[In]\fR Optional outer unknown to allow aggregation with another object. .PP \fIdwClsContext\fR \fB[In]\fR Flags to restrict the location of the created instance. .PP \fIiid\fR \fB[In]\fR The Id of the interface of the instance to return. .PP \fIppv\fR \fB[Out]\fR On returns, contains a pointer to the specified interface of the instance. .PP .SH RETURNS .PP \fBSuccess:\fR \fBS_OK\fR .PP \fBFailure:\fR \fBHRESULT\fR code. .SH NOTES .PP The \fIdwClsContext\fR parameter can be one or more of the following: .br CLSCTX_INPROC_SERVER - Use an in-process server, such as from a DLL. .br CLSCTX_INPROC_HANDLER - Use an in-process object which handles certain functions for an object running in another process. .br CLSCTX_LOCAL_SERVER - Connect to an object running in another process. .br CLSCTX_REMOTE_SERVER - Connect to an object running on another machine. .PP Aggregation is the concept of deferring the IUnknown of an object to another object. This allows a separate object to behave as though it was part of the object and to allow this the \fIpUnkOuter\fR parameter can be set. Note that not all objects support having an outer of unknown. .SH SEE ALSO .PP CoGetClassObject() .SH IMPLEMENTATION .PP Declared in \fB"objbase.h"\fR. .PP Implemented in \fB"dlls/ole32/compobj.c"\fR. .PP Debug channel \fB"ole"\fR.