Click here to Skip to main content
16,013,918 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using all processors when compiling on a SMP machine Pin
Christian Graus27-Nov-02 13:08
protectorChristian Graus27-Nov-02 13:08 
GeneralRe: Using all processors when compiling on a SMP machine Pin
MeeLoo27-Nov-02 13:21
MeeLoo27-Nov-02 13:21 
GeneralRe: Using all processors when compiling on a SMP machine Pin
Christian Graus27-Nov-02 14:46
protectorChristian Graus27-Nov-02 14:46 
GeneralRe: Using all processors when compiling on a SMP machine Pin
MeeLoo28-Nov-02 0:50
MeeLoo28-Nov-02 0:50 
GeneralRe: Using all processors when compiling on a SMP machine Pin
Christian Graus28-Nov-02 0:51
protectorChristian Graus28-Nov-02 0:51 
Generalregsvr32 failed Pin
devvvy27-Nov-02 12:17
devvvy27-Nov-02 12:17 
GeneralRe: regsvr32 failed Pin
devvvy27-Nov-02 12:18
devvvy27-Nov-02 12:18 
General4 suspects? Pin
devvvy27-Nov-02 14:47
devvvy27-Nov-02 14:47 
i figured out the problem, the dll was corrupted in the process of copying it from CD to destination folder.. anyway, i fixed that. Now i tried to LoadLibrary to access DllUnregisterServer and DllRegisterServer...

i load the dll via LoadLibrary and called:

STEP 1: GetProcAddress(hLib, _T("DllUnregisterServer")

proceed to un-register the dll.

STEP 2: GetProcAddress(hLib, _T("DllRegisterServer")

proceed to register the dll.

i still have some trouble. i lauch the VB client and it stop working. tried to open keys from registry and registry complained "error openning key" ... (somehting close to that)

since DllRegisterServer is implemented by ATL Wizard, I assume there's nothing wrong with it (MS never produces buggy code right? )


so, THREE prime suspect:


SUSPECT 1:
PFUNC pFunc = (PFUNC) GetProcAddress(hLib, _T("DllRegisterServer")); //SUSPECT 1: Name mingling.. but pFunc is NOT NULL. So, this is cleared.
if(pFunc!=NULL)
{
//register the server!
pFunc();
}

SUSPECT 2:
typedef void (*PFUNC) (void);

does it matches the signature of..?
STDAPI DllRegisterServer(void)

I am a bit confused by STDAPI, but I just ignore it for the moment... But SUSPECT 2 is the only remaining p
ossibility i can see.

SUSPECT 3:
the installation program i write now call DllUnregisterServer before installing a clean copy. But the old dll may reside in a different folder.

if I call DllUnregisterServer by loading the new dll (in attempt to unregister the old dll...?) you think this will be a problem?

SUSPECT 4:
RegSvr32 does more than just load the dll and call DllRegisterServer and DllUnregisterServer. Developer should not attempt to call these two methods directly and should stick with RegSvr32?



norm
GeneralRe: regsvr32 failed Pin
Peak27-Nov-02 20:21
Peak27-Nov-02 20:21 
GeneralRe: regsvr32 failed Pin
devvvy27-Nov-02 20:34
devvvy27-Nov-02 20:34 
GeneralRe: regsvr32 failed Pin
Peak27-Nov-02 21:08
Peak27-Nov-02 21:08 
GeneralRe: regsvr32 failed Pin
devvvy27-Nov-02 22:58
devvvy27-Nov-02 22:58 
GeneralWhy ole automation error!!! Pin
pnpfriend27-Nov-02 10:24
pnpfriend27-Nov-02 10:24 
GeneralRe: Why ole automation error!!! Pin
Le centriste27-Nov-02 11:57
Le centriste27-Nov-02 11:57 
GeneralRe: Why ole automation error!!! Pin
pnpfriend1-Dec-02 5:40
pnpfriend1-Dec-02 5:40 
GeneralUtility Projects Pin
Anonymous27-Nov-02 10:07
Anonymous27-Nov-02 10:07 
Generaldoc/view architecture question.. Pin
trustno127-Nov-02 9:35
trustno127-Nov-02 9:35 
GeneralRe: doc/view architecture question.. Pin
Michael P Butler27-Nov-02 9:53
Michael P Butler27-Nov-02 9:53 
GeneralRe: doc/view architecture question.. Pin
Alvaro Mendez27-Nov-02 9:55
Alvaro Mendez27-Nov-02 9:55 
GeneralVC++ 6, having trouble with MS Messenger Header and Lib Pin
Fahr27-Nov-02 9:12
Fahr27-Nov-02 9:12 
GeneralRe: VC++ 6, having trouble with MS Messenger Header and Lib Pin
Michael P Butler27-Nov-02 9:34
Michael P Butler27-Nov-02 9:34 
GeneralRe: VC++ 6, having trouble with MS Messenger Header and Lib Pin
Fahr27-Nov-02 9:36
Fahr27-Nov-02 9:36 
GeneralRe: VC++ 6, having trouble with MS Messenger Header and Lib Pin
Michael P Butler27-Nov-02 9:51
Michael P Butler27-Nov-02 9:51 
GeneralRe: VC++ 6, having trouble with MS Messenger Header and Lib Pin
Fahr27-Nov-02 10:21
Fahr27-Nov-02 10:21 
GeneralRe: VC++ 6, having trouble with MS Messenger Header and Lib Pin
Michael P Butler27-Nov-02 10:37
Michael P Butler27-Nov-02 10:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.