This is what I have so far.
I am wondering where Provider.dll is going to come from ?
; ; HANDLE GetMessageResources()
; ; {
; ; HANDLE hResources = NULL;
; ;
; ; hResources = LoadLibraryEx(RESOURCE_DLL, NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY_AS_DATAFILE);
; ; if (NULL == hResources)
; ; {
; ; wprintf(L"LoadLibrary failed with %lu.\n", GetLastError());
; ; }
; ;
; ; return hResources;
; ; }
; Local prototypes
GetMessageResources PROTO
.DATA
LL_Failed db "LoadLibrary failed with('%lu')",0
;format db "INSERT INTO products VALUES(NULL ,'%s','%s','%s','%s','%s')",0
RESOURCE_DLL db "c:\masm32\source\Provider.dll",0
.DATA?
storage db 256 DUP (?)
.CODE
start:
invoke GetMessageResources
invoke ExitProcess,0
GetMessageResources proc
invoke LoadLibraryEx,RESOURCE_DLL, NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY_AS_DATAFILE
;.if
invoke wsprintf,offset storage, offset LL_Failed
ret
GetMessageResources endp
end start
Quote from: Magnum on January 29, 2011, 12:06:47 AM
I am wondering where Provider.dll is going to come from ?
provider.dll is something you compile with the message compiler mc.exe as I said in a previous post, provider.dll is just a sample name of the dll, you can name it whatever you want... You should really read the links you posted in the other thread:
http://msdn.microsoft.com/en-us/library/aa363680(v=VS.85).aspx
Quote from: Gunner on January 29, 2011, 12:22:36 AM
Quote from: Magnum on January 29, 2011, 12:06:47 AM
I am wondering where Provider.dll is going to come from ?
provider.dll is something you compile with the message compiler mc.exe as I said in a previous post, provider.dll is just a sample name of the dll, you can name it whatever you want... You should really read the links you posted in the other thread:
http://msdn.microsoft.com/en-us/library/aa363680(v=VS.85).aspx
Quote
From MSDN:
To compile the message text file, use the following command:
mc -U provider.mc
To compile the resources that the message compiler generated, use the following command:
rc provider.rc
To create the resource-only DLL that contains the message table string resources, use the following command (you can run the command from a Visual Studio Command Prompt):
link -dll -noentry provider.res
by doing the above you will get your provider dll with the errors for the event log
Thanks.
Until today, I did not have the PSDK installed.
I found mc.exe.
I have made the provider.dll.