Jump to content

Anyone have a DLL with a function to dereference memory addresses?


Recommended Posts

Posted

Does anyone have a standalone DLL that has a function which, given a memory address, returns the byte, word or int at that memory address? It would be useful for a hack I'm contemplating, and I don't feel like coding a DLL for a one-off project.

Posted

QUOTE(Aristos Queue @ Jul 20 2007, 02:42 PM)

Does anyone have a standalone DLL that has a function which, given a memory address, returns the byte, word or int at that memory address? It would be useful for a hack I'm contemplating, and I don't feel like coding a DLL for a one-off project.

The way I do this is by calling the LabVIEW internal memory manager function MoveBlock through a Call Library Node.

If you set the source parameter to be an uInt32 by value and the target parameter to be an uInt(x) by reference, and then also adjust the size parameter accordingly you get what is required.

To call MoveBlock in LabVIEW you have to configure the Call Library Node as follows:

Library Name: LabVIEW

Calling Convention: Standard C

Function Name: MoveBlock

return value: void

1. param: source, uInt32 as Value

2. param: target, uIntxx as Pointer

3. param: size, int32 (number of bytes to copy)

Advantage is that you do not need any Toolkits or plattform specific external libraries.

Rolf Kalbermatter

Posted

QUOTE(rolfk @ Jul 22 2007, 03:31 AM)

To call MoveBlock in LabVIEW you have to configure the Call Library Node as follows:

Library Name: LabVIEW

Calling Convention: Standard C

Function Name: MoveBlock

return value: void

1. param: source, uInt32 as Value

2. param: target, uIntxx as Pointer

3. param: size, int32 (number of bytes to copy)

Is there a list of undocumented calls like this to the LV library?

Posted

QUOTE(Yuri33 @ Jul 22 2007, 10:36 PM)

Is there a list of undocumented calls like this to the LV library?

No, and using such callbacks is a trick we go to great lengths to prevent folks from doing.

Posted

QUOTE(Aristos Queue @ Jul 23 2007, 06:38 AM)

No, and using such callbacks is a trick we go to great lengths to prevent folks from doing.

That's a part of Murphys law: if there is a possibility to do such things, someone WILL do such things, whatever you do to prevent that :)

Posted

QUOTE(i2dx @ Jul 23 2007, 07:51 AM)

That's a part of Murphys law: if there is a possibility to do such things, someone WILL do such things, whatever you do to prevent that :)

"Listen to the expert they'll tell you what can't be done, then go do it !"

It was someone's signature on NI forum :thumbup:

Posted

QUOTE(Yuri33 @ Jul 22 2007, 10:36 PM)

It's not undocumented. It is all (except the Library:LabVIEW trick in the Call Library Node) there in the External Code Reference Manual.

Rolf Kalbermatter

QUOTE(Aristos Queue @ Jul 22 2007, 11:38 PM)

No, and using such callbacks is a trick we go to great lengths to prevent folks from doing.

Yea, I figured some of the password protected VIs might use this and similar tricks ;-)

But someone at NI must have forgotten that. There is or maybe used to be a code example on the Developer Exchange Site exactly with the MoveBlock function. So you hardly can call the Library:LabVIEW trick in the Call Library Node to be a well kept secret anymore.

Rolf Kalbermatter

Posted

QUOTE(rolfk @ Jul 23 2007, 05:18 PM)

But someone at NI must have forgotten that. There is or maybe used to be a code example on the Developer Exchange Site exactly with the MoveBlock function. So you hardly can call the Library:LabVIEW trick in the Call Library Node to be a well kept secret anymore.

True. Which is why licensing got applied to scripting. You probably don't want to promote the publicity of this lest similar protections come to the callback.

Posted

QUOTE(Aristos Queue @ Jul 23 2007, 05:29 PM)

True. Which is why licensing got applied to scripting. You probably don't want to promote the publicity of this lest similar protections come to the callback.

This sentiment! Is that official NI policy now? Maybe it has come the time to consider for me if LabVIEW is still the tool I love to work with.

Rolf Kalbermatter

Posted

QUOTE(crelf @ Jul 24 2007, 01:30 AM)

Of course you can. Noone can prevent you from creating a VI in LV 7.1.1 which contains all the scripting nodes you need. OK, maybe the code is less efficient and you will miss something, but it still works. I still use Scripting in my tools under LV 8.2.1, and I have developed new ones ... (and I found out many of the scripting nodes are now simply "private")

QUOTE(rolfk @ Jul 24 2007, 07:21 AM)

This sentiment! Is that official NI policy now? Maybe it has come the time to consider for me if LabVIEW is still the tool I love to work with.

that reminds me a little bit about Galileo Galilei ...

In a way I can understand AQs concerns, I interpret that as "don't make me more work as I allready have" (due to support, etc ...) ;) on the other hand it is a fact, that humans are courious and have allways tried to gain more knowledge. This truth is expicid valid for IT gurus ;) so it's wrong to blame the experts for trying to gain more knowledge. Last but not least that is what NI wants: a community of LV developers which has a broad base of knowledge!?

(I hope I am not wrong and the NI's favourite LV user likes the express functions most ... <shiver>)

Posted

QUOTE(rolfk @ Jul 24 2007, 12:21 AM)

This sentiment! Is that official NI policy now?

Nah, just my personal thought on the situation. I'm not privvy to the conversation that lead to the licensing of scripting. It just seems that no one around NI minds when the advanced customers dig stuff out of "LabVIEW's attic", but when it starts showing up among the general user base and creating a support burden, there starts to be grumbling about "never intended that to be opened up."

Posted

QUOTE(crelf @ Jul 25 2007, 01:39 AM)

Of course you can.

I was kidding - hence the " ;) "

ah, ok, it's sometimes hard to notice a joke with my "bavarian english" ;)

:beer:

Posted

QUOTE(i2dx @ Jul 25 2007, 03:44 PM)

ah, ok, it's sometimes hard to notice a joke with my "bavarian english" ;)

No worries, sometimes my "Australian English" gets me in a lot of trouble :D

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.