Groups | Search | Server Info | Login | Register


Groups > comp.lang.c.moderated > #494

Help with conversion

Path csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!gegeweb.org!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.ag!news2.euro.net!82.197.223.103.MISMATCH!feeder3.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.242.MISMATCH!nx01.iad01.newshosting.com!newshosting.com!newspump.sol.net!posts.news.megabitz.net!nnrp3-asbnva.megabitz.net!not-for-mail
From Mint <chocolatemint77581@yahoo.com>
Newsgroups comp.lang.c.moderated
Subject Help with conversion
Date Tue, 1 Feb 2011 16:28:45 -0600 (CST)
Organization http://groups.google.com
Sender clcm@herd.plethora.net
Approved clc@plethora.net
Message-ID <clcm-20110201-0007@plethora.net> (permalink)
User-Agent G2/1.0
Complaints-To groups-abuse@google.com
Return-Path <news@google.com>
X-Original-to clcm@plethora.net
X-Old-complaints-to groups-abuse@google.com
Content-Type text/plain; charset=ISO-8859-1
Mime-Version 1.0
Delivered-To clcm@localhost.plethora.net
X-Old-trace posting.google.com 1296312987 7704 127.0.0.1 (29 Jan 2011 14:56:27 GMT)
Injection-Info a8g2000pri.googlegroups.com; posting-host=99.23.102.37; posting-account=zgsv_AoAAAAsiLbH7O88H4xntaNl602j
X-Http-useragent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13,gzip(gfe)
X-Authentication-warning ywd9.prod.google.com: news set sender to news@google.com using -f
Lines 73
NNTP-Posting-Date 01 Feb 2011 22:28:48 GMT
NNTP-Posting-Host ace5bbe0.news.megabitz.net
X-Trace DXC=gJ>Y33OhdX=ohKBX\Q8F;1><6FU_Q:4m2^W\Y;gN2lO=7?\JHXgWf]7Ae^NO;\VoU<7d@DE\31QY5MoRO]O40E38`H03LY\jMh0V]jgPWQSKP9
X-Complaints-To abuse@megabitz.net
Xref csiph.com comp.lang.c.moderated:494

Show key headers only | View raw


I am trying to convert this C code to an assembly procedure.

I am using ml.exe and link.exe.

Is there someone who could help me?

Thanks


;  ; 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;
;  ; }

This is what I have so far.
Plenty of mistakes, but I will work to fix them all.

Andy


; Local prototypes

GetMessageResources   PROTO

.DATA

LL_Failed      db  "LoadLibrary failed with",0
RESOURCE_DLL   db  "c:\masm32\source\Provider.dll",0
FormatString db "%s", 0
OutputBuffer db 50 dup (0)

.DATA?

hwnd    HWND  ?

.CODE

start:

invoke GetMessageResources

invoke ExitProcess,0

GetMessageResources proc

invoke LoadLibraryEx,RESOURCE_DLL, NULL,
LOAD_LIBRARY_AS_IMAGE_RESOURCE OR LOAD_LIBRARY_AS_DATAFILE

.if EAX == 0

invoke wsprintf, ADDR OutputBuffer, ADDR FormatString, ADDR LL_Failed

.ELSE

.endif

ret

GetMessageResources endp
-- 
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line.  Sorry.

Back to comp.lang.c.moderated | Previous | NextNext in thread | Find similar


Thread

Help with conversion Mint <chocolatemint77581@yahoo.com> - 2011-02-01 16:28 -0600
  Re: Help with conversion Kenneth Brody <kenbrody@spamcop.net> - 2011-02-04 12:45 -0600
  Re: Help with conversion Jasen Betts <jasen@xnet.co.nz> - 2011-02-04 12:45 -0600

csiph-web