Click here to Skip to main content
15,921,840 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: lpCurrentDirectory Pin
soul.ripper31-May-04 11:43
soul.ripper31-May-04 11:43 
GeneralAPI Problem - Get The Icon For Another Window Pin
ColonelSanders30-May-04 15:56
ColonelSanders30-May-04 15:56 
GeneralRe: API Problem - Get The Icon For Another Window Pin
DSclub30-May-04 21:05
DSclub30-May-04 21:05 
GeneralRe: API Problem - Get The Icon For Another Window Pin
Dave Kreskowiak31-May-04 1:05
mveDave Kreskowiak31-May-04 1:05 
GeneralRe: API Problem - Get The Icon For Another Window Pin
ColonelSanders31-May-04 8:38
ColonelSanders31-May-04 8:38 
GeneralRe: API Problem - Get The Icon For Another Window Pin
Dave Kreskowiak31-May-04 11:18
mveDave Kreskowiak31-May-04 11:18 
GeneralrtlMoveMemory Dll Call Problem In .NET Pin
Pugman81230-May-04 11:55
Pugman81230-May-04 11:55 
GeneralRe: rtlMoveMemory Dll Call Problem In .NET Pin
Dave Kreskowiak31-May-04 1:03
mveDave Kreskowiak31-May-04 1:03 
The problem is you CAN'T use this function on managed objects and variables in .NET. The address you provide is not guaranteed to be the address of your object when the call to CopyMemory if made. The speed issue your having is because your marshaling objects back and forth between managed and unmanaged code.

Youe best bet is to trace through the code in VB6, and step by step, follow what happens to the array, then duplicate the steps necessary to perform the same thng in managed code. You'll be writing extra lines of code to do this, but you'll also gain a nice performance benefit by doing it either of there two ways.

So instead of CopyMemory from bytearray2 to bytearray0, you would just do:
bytearray(0) = bytearray(2)
bytearray(1) = bytearray(3)
bytearray(2) = bytearray(4)
bytearray(3) = bytearray(5)


You could also do this:
Array.Copy( bytearray, 2, bytearray, 0, 4)

You'll have to test each method to find out which is going to give you the greatest performance benefit, but both will be MUCH better than calling an unmanaged function on a managed object...


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

QuestionHow can I disable CANCEL box in System.Window.form? Pin
ATC30-May-04 5:43
ATC30-May-04 5:43 
AnswerRe: How can I disable CANCEL box in System.Window.form? Pin
Syed Abdul Khader30-May-04 18:59
Syed Abdul Khader30-May-04 18:59 
GeneralRe: How can I disable CANCEL box in System.Window.form? Pin
ATC31-May-04 8:13
ATC31-May-04 8:13 
Generalanswer can or cannot Pin
GaryKoh29-May-04 16:12
GaryKoh29-May-04 16:12 
GeneralRe: answer can or cannot Pin
Hesham Amin31-May-04 7:33
Hesham Amin31-May-04 7:33 
GeneralRe: answer can or cannot Pin
f6431-May-04 10:05
f6431-May-04 10:05 
GeneralRe: answer can or cannot Pin
GaryKoh31-May-04 14:05
GaryKoh31-May-04 14:05 
General Importing from password protected .xls (I know the password) Pin
GameFaqsPower12329-May-04 9:29
GameFaqsPower12329-May-04 9:29 
GeneralRe: Importing from password protected .xls (I know the password) Pin
Dave Kreskowiak29-May-04 15:15
mveDave Kreskowiak29-May-04 15:15 
Generalconnect to server Pin
GaryKoh28-May-04 21:41
GaryKoh28-May-04 21:41 
GeneralPlugins Pin
beowulfagate28-May-04 14:15
beowulfagate28-May-04 14:15 
GeneralRe: Plugins Pin
Mike Ellison28-May-04 14:43
Mike Ellison28-May-04 14:43 
GeneralRe: Plugins Pin
beowulfagate28-May-04 14:56
beowulfagate28-May-04 14:56 
GeneralWM_GETTEXT from text box. Please Help... Pin
danfloun28-May-04 12:33
danfloun28-May-04 12:33 
Questionhow do you create a .mat file in VB6? Pin
murphypa28-May-04 8:49
murphypa28-May-04 8:49 
AnswerRe: how do you create a .mat file in VB6? Pin
Dave Kreskowiak28-May-04 9:25
mveDave Kreskowiak28-May-04 9:25 
GeneralIs there a general way to check a string... Pin
viettho28-May-04 7:30
viettho28-May-04 7:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.