Re: newbe about API

From: THAW ("THAW")
Date: 03/24/04


Date: Wed, 24 Mar 2004 17:04:48 +0100


"wolfgang kern" <nowhere@nevernet.at> wrote in message
news:c3p6m8$6sg$2@newsreader1.utanet.at...
> Hi,
>
Hi Wolfgang. Maybe a tip to go to RosAsm forum and ask theese questions ? I
dont dear to answer, but would also like to have the info on theese
questions for sure. Here is what I "know" about it sofar (not much I am
afraid).

> 1---
> Are the API-calls hardwired to 0040xxxx ?
> or will some 're-allocation' take place first?

"All" api calls are calls to DLLs. According to Beth, the system DLLS are
relocated diffrently from fabric, and does not need relocation by default.
If the 0040xxxx adress is "hardwired" or not I wouldnt know. The way I see
it, is that the real adress is "unimportant", the 0040xxxx I would guess is
a virtual adress in the client applications adresspace, that when you call
it, it will be redirected to the correct adress for the DLL function you
call. It gives that all client applications vill have the same virtual call
adress for an API binding, if the virtual adress in the client application
AdressSpace has not been previously taken up by another DLL. I assume that
the relocation of dlls take place at PE loading time, and thus the adress
should be available for the first DLL "loaded". This, if correct would mean
that the second DLL loaded to the same adress, would need to be relocated,
but that the relocation would probably be the same for to identical apps.

So I would assume hardcoding should maybe be possible. But dont take my word
for it, as I really dont know. What about testing it ?

>
> 2---
> Are the literal strings in the header necessary,
> or are they just there for debugging/info?

An export can be done by index or by name. I assume the index is allways
present, but I am not sure. I think the string is just an alternative way so
you dont have to remember the indexes.

> 3---
> What win32-API documentation would you recommend in terms of
> being updated, reliable, short, logical ordered ...
> (winasm32.hlp seems not to be what I'm looking for).
> Where can I find a hex-sorted list of the win-API functions?

Take a look at the win32 doc project at the RosAsm forum. Otherwise I like
to have better API helpfiles myself. And if you find something that is
really good. Please stop by and tell me.

> 4---
> Or the other way around, what are the 20 functions for:
>
> memmgr:
> ALLOC, DEALLOC
>
> filemgr:
> OPEN/CREATE, part-RD/WR, CLOSE, DELETE
>
> stdIO/GUI:
> MENU, MSG, TEXT-INP, NUM-INP,
> VMODE-SET, KEYBD-HOOK
>
> RS232/(USB2):
> SETUP, CONFIG, SEND/RECEIVE
>
> printer:
> SETUP, SET-FORMAT,..
>
:-) Dont understand what you mean here. Ask Rene. He is the PE writer.

> 5---
> Can I 'import code' from a '.bin-file'
> (like INLINE, but not as ASM-inc or .obj-file)
> into FASM, MASM32, or RosAsm?

I know one way. Load it from a file. Allocate memory for it, upload the code
to memory, set the memory flags as executable and call it. For someone like
you that shouldnt be to hard. I havent done it yet though, so I cant be sure
it works, but I would guess it would work like nobodies buisness. The hard
part would be if it need to call a lot of code in the app, but for just a
function doing some calculations it should be easy.

If this didnt help anything at all, maybe the errors in my explaination will
provide the clues anyhow. Thats sometimes how I learn stuff.

:-)

> ---
> TIA.
> __
> wolfgang
>
>
>



Relevant Pages

  • Re: How do you create error code?
    ... module code and the error tracking class CError) is in a separate dll. ... The clients of the dll, which want to use an instance of CError to do ... In case of the adress of the exit routine this is an adress in a ...
    (microsoft.public.vb.general.discussion)
  • Re: CHKDSK killed my OpenGL subsystem
    ... I wouldn't risk using a Restore Point for 2 reasons: ... Well power off and cache stuff I dont think so at least not for the dll... ... >> Is there anything that can be done to make chkdsk give more information ...
    (microsoft.public.windowsxp.general)
  • Re: Sending Events to VB6 Using Implements Keyword - debugging
    ... Whilst vb has just one thread, the dll can have ... I dont want to go down this route. ... defines an object that supports a connection point. ... so that, for increased performance, one may use the interface instead ...
    (microsoft.public.vc.atl)
  • Re: WebSite or WebApplication in C# for TDD Approach ?
    ... If I create a new WebSite,then for every page it creates a dll. ... right click and select the option to "Create Test", I dont get a new Test ... I am using Visual Studio 2005 Team Edition for Software Developers. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: i really need help!
    ... code of the VB Core Libraries (which supplies dot net like ... like they dont see eachother. ... DLL as you can't give them specific class IDs. ... expose DLLV1 classes? ...
    (microsoft.public.vb.winapi)