I would be interested to know if you ever found a solution. I too have recently come across this very same issue when trying to access the Profile object. I dont think it is related to this article some configuration issue on the server - look up MOSS and profile null.
Ram Cronus
Posts
-
System.ArgumentNullException: Value cannot be null. [modified] -
CreateProcess - file privilegesThx Phil for the reply - yeah CreateProcess works fine was using that before but CreateProcessAsUser is the painful culprit :( unfortunately I'm still left with an uninitialised PROCESS_INFORMATION object when the call fails - and GetLastError says it completed successfully :(
-
MSWord 2000 eventsPlain and simple has anyone got : Quit, DocChange to work? Now I've been using ATL IDispEventImpl with Word 97 with no problems what so ever. I have changed the import libraries: #import "r:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\MSO9.DLL" rename("RGB", "WordRGB") rename("DocumentProperties", "WordDocumentProperties")raw_interfaces_only #import "c:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\VBA\VBA6\VBE6EXT.OLB" raw_interfaces_only #import "r:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\MSWORD9.OLB" rename("ExitWindows", "WordExitWindows") rename("FindText", "WordFindText") raw_interfaces_only The version and the new interface ApplicationEvents2 IDispEventImpl and I have tried the MSoft sample ms-help://MS.MSDNQTR.2002JAN.1033/vcsample/html/vcrefATLEventHandlingSample.htm but even that doesnt work :( Oh and I have given myself permissions to the Word Document component via Dcomcnfg so I can launch Word. So basically I can launch word - load Docs etc no probs however I cant get my app to respond to any events - has anyone been able to do this with Word 2000? and how plz :)
-
CreateProcess - file privilegesMany thx. Looks like it solved the problem with the privileges only problem now is the call to CreateProcessAsUser fails with GetLastError returning "The Operation completed successfully" :( and no, the process was not started. if(CreateProcessAsUser(HToken , NULL , "myapp.exe" // present in system32 , NULL , NULL , TRUE , NORMAL_PRIORITY_CLASS , NULL , m_pSchedule->DirectoryBuff , &st , &proc) == 0) { ... GetLastError, CloseHandle(HToken), return } CloseHandle(HToken); btw Im launching a dos program (I dont wish to c the window) - before, when using CreateProcess, I was using the flag CREATE_NOWINDOW which was successful.
-
Process HandleThe 0xff thing is correct as in the doc however u may want to use the PID instead i.e. GetCurrentProcessId() Until the process terminates, the process identifier uniquely identifies the process throughout the system