|
-
Jul 14th, 2002, 01:21 PM
#1
Thread Starter
PowerPoster
accessing dlls
I was thinking of moving some code in an app to a C++ dll to speed up the execution of some heavy loops. This will all be new to me so I have some concerns.
1) I would have to be able to pass UDTs as arguments .. is this possible? Anyone know where I can find a quick example?
2) How much will I have to give up in terms of debugging? Im guessing there is no way to run the VB prog in Debug and step into the C++ dll? How would you debug this sort of application?
3) Is it possible that the overhead of passing UDTs as arguments will negate the benefit of the increased speed of C++ ?
Thanks for any help!
-
Jul 14th, 2002, 01:25 PM
#2
Frenzied Member
Passing UDTs as arguments is simple. Just use
VB Code:
Public Declare Function xx Lib "xx.dll" ([b]UDT As MYTYPE[/b]) As Long
In VB, you can't step into a VC++ dll, so you either have to debug it in C++ or just assume that your DLL is error-free and assume all unidentifiable error as one in the DLL.
There is little overhead in passing UDTs since only a memory pointer is passed. Just make sure you don't change anything not meant to be changed!
MicroBasic
Dragon Shadow Trainer
There is no good or evil in the world...only programmers and fools .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|