You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Anton

Beginner

  • "Anton" started this thread

Posts: 5

Date of registration: Mar 6th 2010

  • Send private message

1

Sunday, October 17th 2010, 11:26pm

'As Any' doesn't work. 'ByVal' doesn't work.

Private WinApi Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal length As Long)

Any way around this? thanks.

CopyMemory host,ByVal gethostbyname(address), Len(host)

Any way around this also? thanks.

OlimilO

Intermediate

  • "OlimilO" is male

Posts: 277

Date of registration: Jan 18th 2009

Location: Germany

Occupation: software engineer

  • Send private message

2

Monday, October 18th 2010, 10:34am

'ByVal' works really good!

Quoted

'As Any' doesn't work

As Any in VB means just push a pointer to the stack



Quoted

'ByVal' doesn't work.

NO!
It's more like: ByRef does'nt work
but yes there is a workaround please have a look at this:
How to use pointer with Jabaco



But it would be better for you to forget about the old VB-hacks with the intensive usage of CopyMemory.
Show us your code, maybe there are already any Java classes that solves your problems in another way.



good luck

OlimilO

Rate this thread
WoltLab Burning Board