.\" -*- nroff -*- .\" Generated file - DO NOT EDIT! .TH CoRegisterClassObject 3w "Oct 2012" "Wine API" "Wine API" .SH NAME \fBCoRegisterClassObject\fR (OLE32.@) .SH SYNOPSIS HRESULT CoRegisterClassObject ( REFCLSID \fIrclsid\fR, LPUNKNOWN \fIpUnk\fR, DWORD \fIdwClsContext\fR, DWORD \fIflags\fR, LPDWORD \fIlpdwRegister\fR ) .SH DESCRIPTION .PP Registers the class object for a given class \fBID\fR. Servers housed in \fBEXE\fR files use this method instead of exporting DllGetClassObject to allow other code to connect to their objects. .SH PARAMS \fIrclsid\fR \fB[In]\fR \fBCLSID\fR of the object to register. .PP \fIpUnk\fR \fB[In]\fR IUnknown of the object. .PP \fIdwClsContext\fR \fB[In]\fR \fBCLSCTX\fR \fIflags\fR indicating the context in which to run the executable. .PP \fIflags\fR \fB[In]\fR \fBREGCLS\fR \fIflags\fR indicating how connections are made. .PP \fIlpdwRegister\fR \fB[In]\fR A unique cookie that can be passed to CoRevokeClassObject. .PP .SH RETURNS .PP \fBS_OK\fR on success, \fBE_INVALIDARG\fR if \fIlpdwRegister\fR or \fIpUnk\fR are \fBNULL\fR, \fBCO_E_OBJISREG\fR if the object is already registered. We should not return this. .SH SEE ALSO .PP CoRevokeClassObject, CoGetClassObject. .SH NOTES .PP In-process objects are only registered for the current apartment. CoGetClassObject() and \fBCoCreateInstance(3w)\fR will not return objects registered in other apartments. .SH BUGS .PP \fBMSDN\fR claims that multiple interface registrations are legal, but we can't do that with our current implementation. .SH IMPLEMENTATION .PP Declared in \fB"objbase.h"\fR. .PP Implemented in \fB"dlls/ole32/compobj.c"\fR. .PP Debug channel \fB"ole"\fR.