why bloat? i just call the stuff from my prog. i don't insert all the functions. so it's plain calling - no bloating ...
Posted on 2002-09-14 06:13:58 by ploptor
But its a 1.6 MB file your programm depends on then.
And not every version of Windows has this dll installed.
Please tell us, why you want to use the VB functions when you could write them as well in pure assembly? :confused:
Posted on 2002-09-14 07:51:42 by bazik
Afternoon, Sven.

I'd imagine that it's to do with learning win32asm programming.

Many people are coming from a VB background, and are totally lost inside the win32 API at first.
It'd make things a lot easier for them to see examples of a proggy calling functions which they're already familiar with.

I, myself, would be very interested in seeing if it *is* possible to call VB functions from assembly. I've never seen this done, nor found any examples of doing so on the Net.

The "answers" people have given on this thread remind me of something Jeff Duntemann wrote in his book "Assembly Language Step-by-Step":
Note well: When somebody asks you, "Why would you want to do that?" what it really means is this: "You've asked me how to do something that is either impossible using tools that I favor or completely outside my experience, but I don't want to lose face by admitting it. So....how 'bout those Blackhawks?"


Cheers,
Scronty
Posted on 2002-09-14 19:00:03 by Scronty
Ploptor, I haven't tested this, but it seems you are missing some parameters in rtcMsgBox. First, Microsoft says there are 5 parameters to MsgBox, but you put only 3. Those missing seems to be related to help file and context.

You can try to push 0 to push some null values 2 times before the other values.
Posted on 2002-09-15 08:16:33 by Silas

Ploptor, I haven't tested this, but it seems you are missing some parameters in rtcMsgBox. First, Microsoft says there are 5 parameters to MsgBox, but you put only 3. Those missing seems to be related to help file and context.

You can try to push 0 to push some null values 2 times before the other values.
Within a debugger you could also check the stack value on return.
Posted on 2002-09-15 09:35:16 by bitRAKE
Hehe, spend some time in the debugger.
Not all secrets are revealed, but at least I can say to ploptor that his method will not work.
As I see rtcMsgBox receive 5 parameters which are kind of pointer of indexes. For ex.
push eax ; point to dd 0ah
push eax ; point to dd 0ah
push ecx ; point to dd 08h
push edi ; edi=0
push eax ; point to dd 08h

Then in two different routine preparing text in unicode for prompt and title, on exit of each other there is address of text.
After this pushing 6 parameters to another routine which is finally shows us messagebox.
Posted on 2002-09-15 11:05:49 by masquer
masquer, you will be banned soon because of RE, which is a major crime in this board.
Posted on 2002-09-16 00:01:49 by japheth

masquer, you will be banned soon because of RE, which is a major crime in this board.


Heh, I guess he debugged his own programm, so there is no problem here. Our rules are not that strict ;)
Posted on 2002-09-16 00:45:05 by bazik
japheth
I know I balancing on the edge, but, as bazik said - it was my VB program.
Posted on 2002-09-16 05:31:14 by masquer
I personally think this thread needs to be closed, preferably now. The signal to noise ratio is getting worse, and ploptor has not detailed why he wants to use the vb runtime.

ploptor,
as a VB and asm programmer, i respectably suggest that you are wasting your time with the runtime. Many of those functions are just wrappers for the standard API, and as hutch said, none of it is documented. There is absolutely no need for you to use it. If you *do* need to use it, write a VB app to do it, then do your critical stuff in asm. I can understand you reasons if it is just to see if it can be done, but just remember that you will be paddling up a river of sh*t with no paddle....


Scronty,
yes, it is possible to call VB from asm, but it is unusual to need to do that, more likely that you would call asm from vb. I made a little asm tool that enhanced vb forms in a few ways, and i used callbacks to call the vb functions when needed. Calling stuff in a vb dll is more complex, you need to wade thru interfaces to get to the functions you want.
Posted on 2002-09-16 07:37:32 by sluggy
I hope I'm not getting my feet too wet...

I know before I got used to resources files, I wanted to use the vb inputbox but there are no easy api for this.

So I could have tried to use the vb dll for this. I haven't because I managed to find how to create my own inputbox before this.

At the start of his message, Ploptor speak of inputbox. My guess, as I tried to do before, is that he is trying to fetch input easily.

In that case, the easiest and with less overhead would be to have a resource file with a custom dialog of a simple label and textbox. It's not that hard... Just check the icz tuts.
Posted on 2002-09-16 11:27:53 by Silas
Silas
At the start of his message, Ploptor speak of inputbox

As I remember we talk about messagebox from asm using msvbvm60.dll
I agree with sluggy - this topic have no sense.
Further discussion will lead to either flame and offtopic or overstep the rules.
Posted on 2002-09-16 22:47:02 by masquer
my actual intention was to get my hand on those pre-made dialog functions, e.g. the inputbox, since those dont need to be re-written 'cos they're already there. but as it seems, there's no way to make use of it...
Posted on 2002-09-20 04:46:44 by ploptor
VB input box was very useful and it is a pity that it is not available in the standard win32 API...

That said, do as Silas did, creating a InputBox is not hard at all... (for a basic one, you need no more than four arguments : caption, text, and a pointer to the destination buffer to receive the text inputed in the text box, and the max size of this buffer) and you can customize it to do what you exactly want and then have much better and suitable to your application results... and if you use it frenquently in all your apps you can even build it as a dll...
Posted on 2002-09-20 04:55:50 by JCP