News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Writing a proc

Started by Magnum, January 29, 2011, 12:06:47 AM

Previous topic - Next topic

Magnum

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

Have a great day,
                         Andy

Gunner

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
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

Gunner

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
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

Magnum

Thanks.

Until today, I did not have the PSDK installed.

I found mc.exe.



Have a great day,
                         Andy

Magnum

I have made the provider.dll.

Have a great day,
                         Andy