Click here to Skip to main content
15,914,488 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralParameter problem Pin
Monty229-Jan-05 22:14
Monty229-Jan-05 22:14 
GeneralRe: Parameter problem Pin
Jörgen Sigvardsson29-Jan-05 22:32
Jörgen Sigvardsson29-Jan-05 22:32 
GeneralRe: Parameter problem Pin
Monty229-Jan-05 22:40
Monty229-Jan-05 22:40 
GeneralFindResourceEx Pin
GanescuC27-Jan-05 23:36
GanescuC27-Jan-05 23:36 
QuestionHow to get the active project in visual studio Pin
JabraJabra26-Jan-05 21:51
JabraJabra26-Jan-05 21:51 
AnswerRe: How to get the active project in visual studio Pin
Stuart Dootson27-Jan-05 21:01
professionalStuart Dootson27-Jan-05 21:01 
GeneralRe: How to get the active project in visual studio Pin
JabraJabra31-Jan-05 4:25
JabraJabra31-Jan-05 4:25 
Generalwinlogon/Notify problem. Pin
dabayi26-Jan-05 4:11
dabayi26-Jan-05 4:11 
Hallo,

I’m facing a winlogon/Notify problem.

I’m creating to Winlogon Notification Package. I have therefore written an ATL DLL with a winlogonevent handler function. I exported the winlogon event handler function with the “MyProjectName.def” file as follows


LIBRARY "MyProjectNamaePS"

EXPORTS
DllGetClassObject PRIVATE
DllCanUnloadNow PRIVATE
GetProxyDllInfo PRIVATE
DllRegisterServer PRIVATE
DllUnregisterServer PRIVATE
fLogonEventHandler PRIVATE
fLogoutEventHandler PRIVATE

From the fLogonEventHandler function I’m doing the following things


void fLogonEventHandler (PWLX_NOTIFICATION_INFO pInfo)
{
LPCTSTR lpTestValue;
HKEY hk;
DWORD dwData, dwDisp;
TCHAR BufSubkey[MAX_PATH];
LPTSTR MyTestValue;
long HRESULT;

BOOL BRESULT = 0;
LPCTSTR lpCaption;
TCHAR msg[128];

lpCaption = TEXT("OK");
wsprintf(msg, "It's OK!");
MessageBox(NULL, msg, lpCaption, MB_OK);

dwData = 1;
MyTestValue = TEXT("Test Value\n");
wsprintf(BufSubkey,"MyTESTCONTROL"\\TEST");

HRESULT = -1;

HRESULT = RegCreateKeyEx(HKEY_CURRENT_USER,
BufSubkey,
0,
NULL,
REG_OPTION_NON_VOLATILE,
KEY_WRITE,
NULL,
&hk,
&dwDisp);

if (HRESULT == ERROR_SUCCESS)
{
HRESULT = RegSetValueEx(hk,
MTestValue,
0,
REG_DWORD,
(LPBYTE)&dwData,
sizeof(DWORD));
}
}


I registered the dynamic library on a terminal server and used Regmon.exe and filemon.exe to monitor the logon event on the server, and I created the registry entries inside the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\MyProjectname" subkey to register my dll.

Asynchronous = REG_DWORD 1
DllName = REG_SZ MyProjectname.dll
Impersonate = REG_DWORD 0
Logon = REG_SZ fLogonEventHandler

It appeared that the library was called at logon. But I did not seen the massage box and the user did not had in his registry the entry as it has to be.

Can anyone point me please to what I’m doing wrong?

Thanks a lot for your help.







dabayi
GeneralRe: winlogon/Notify problem. Pin
geo_m26-Jan-05 7:55
geo_m26-Jan-05 7:55 
GeneralRe: winlogon/Notify problem. Pin
dabayi27-Jan-05 1:58
dabayi27-Jan-05 1:58 
GeneralRe: winlogon/Notify problem. Pin
geo_m27-Jan-05 4:37
geo_m27-Jan-05 4:37 
GeneralRe: winlogon/Notify problem. Pin
Anonymous31-Jan-05 23:07
Anonymous31-Jan-05 23:07 
GeneralRe: winlogon/Notify problem. Pin
geo_m1-Feb-05 20:43
geo_m1-Feb-05 20:43 
QuestionATL/WTL Replacement for EscapeToCString? Pin
HurricaneFlossie25-Jan-05 13:17
HurricaneFlossie25-Jan-05 13:17 
AnswerRe: ATL/WTL Replacement for EscapeToCString? Pin
Jörgen Sigvardsson25-Jan-05 13:53
Jörgen Sigvardsson25-Jan-05 13:53 
AnswerRe: ATL/WTL Replacement for EscapeToCString? Pin
Stuart Dootson26-Jan-05 2:32
professionalStuart Dootson26-Jan-05 2:32 
GeneralRe: ATL/WTL Replacement for EscapeToCString? Pin
HurricaneFlossie26-Jan-05 12:59
HurricaneFlossie26-Jan-05 12:59 
GeneralAdding member variables to ATL composite ActiveX control Pin
mattxlr824-Jan-05 7:34
mattxlr824-Jan-05 7:34 
GeneralATL COM programming Pin
NV1023-Jan-05 1:18
NV1023-Jan-05 1:18 
QuestionHow to expose a datetime type in WSDL in a ATL Webservice Pin
Michael B. Hansen20-Jan-05 21:32
Michael B. Hansen20-Jan-05 21:32 
QuestionHow to port a win32 without MFC project to ActiveX Control Pin
Le Hong Anh18-Jan-05 19:08
Le Hong Anh18-Jan-05 19:08 
Question,How to add interface wothout wizard ? Pin
Ritu Kwatra18-Jan-05 16:58
Ritu Kwatra18-Jan-05 16:58 
AnswerRe: ,How to add interface wothout wizard ? Pin
ThatsAlok18-Jan-05 18:41
ThatsAlok18-Jan-05 18:41 
GeneralRe: ,How to add interface wothout wizard ? Pin
Ritu Kwatra18-Jan-05 23:50
Ritu Kwatra18-Jan-05 23:50 
GeneralRe: ,How to add interface wothout wizard ? Pin
ThatsAlok19-Jan-05 0:52
ThatsAlok19-Jan-05 0:52 

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.