Re: Variable cloning
From: Jim Mack (jmack_at_mdxi.nospam.com)
Date: 01/31/05
- Next message: Paul Clement: "Re: Import Excel File"
- Previous message: Sam Hobbs: "Re: VerQueryValue"
- In reply to: Danny: "Re: Variable cloning"
- Next in thread: Danny: "Re: Variable cloning"
- Reply: Danny: "Re: Variable cloning"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 30 Jan 2005 21:40:09 -0500
Danny wrote:
> Date: Fri, 28 Jan 2005 16:34:38 -0500
> Name: "Jim Mack" <jmack@mdxi.nospam.com>
>
>>> It's very, very messy... The linked list is composed of both. The
>>> DLL requires C structures to communicate parameters and data back
>>> and forth.
>>>
>>> Therefore, VB needs to set up some of those C structures (I emulate
>>> them with UDTs) before a DLL call is made. The DLL then adds various
>>> links anchored in these UDTs i.e., their parent/child fields contain
>>> the absolute address of the UDT.
>>>
>>> This means I always need to know the physical location of the UDTs.
>>> The problem is, if I Dim a variable and assign a UDT to it, the
>>> address of this variable is no longer the same as the address of
>>> original UDT (even though the values are). And that means the
>>> variable is no longer a part of the linked list.
>>
>> This is all very odd, which I guess you know :-).
>
> Tell me about it! I have wads of hair around my chair and scratch
> marks on the walls to prove it! ;o)
Well, if you have a working solution then I guess anything further is
moot.
I still think that given a complete look at the prototypes and Declares,
we could have come up with an answer, but no point now.
> While in C you can
> happily assign pointers to variables, you can't do that in VB (that I
> know of - and that's my question, actually).
You can assign pointers to variables in VB, and your own code shows that
you know that. pVarbl = VarPtr(varbl) does exactly that. What you can't
do so easily is then access varbl through pVarbl as you can in C.
Good luck, looks like you'll need it...
--
Jim Mack
MicroDexterity Inc
www.microdexterity.com
- Next message: Paul Clement: "Re: Import Excel File"
- Previous message: Sam Hobbs: "Re: VerQueryValue"
- In reply to: Danny: "Re: Variable cloning"
- Next in thread: Danny: "Re: Variable cloning"
- Reply: Danny: "Re: Variable cloning"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|