I am getting syntax errors trying to access a variable in an object from another object.
example:
The object variable that I want to access was defined in the object with:

DefineVariable  pFileName, Pointer

In my main app I have a variable :
 Define Variable pFileDlg,   Pointer
.
that I use to hold a pointer to an instance of the first object.
When I try to access pFileName inside a method of the main app, using the following:
mov eax, .pFileDlg::FileDlgObjects.pFileName


I get :
 error A2008: syntax error : :

at compile time.
What am i doing wrong?
thanks
rags
Posted on 2006-03-15 13:10:36 by rags
Try:

mov eax, .pFileDlg
mov eax, .pFileName


I don't use OA32 much (I tried it out a while back but just because a friends code used it) but it makes since that if .pFileDlg is a pointer, than you can access .pFileName by a reference of it. Also the :: is probably a part of the OCall macro so you can't use it directly with anything other than OCall (just a guess). Try it out, if it works cool. If not post back and maybe Biterider, Ultrano, NaN, or Homer will see the post and can help you out with it.

Regards,
Bryant Keller
Posted on 2006-03-15 13:45:22 by Synfire
Hi Rags
I think that this should work:

mov ecx, .pFileDlg
mov eax, .FileDlgObjects.pFileName


or

mov ecx, .pFileDlg
mov eax, (FileDlgObjects ptr ).pFileName


I prefer the first form.

Regards,

Biterider
Posted on 2006-03-15 14:39:52 by Biterider

I think that this should work:
mov ecx, .pFileDlg
mov eax, .FileDlgObjects.pFileName


It worked, thank you. :lol:
Rags
Posted on 2006-03-16 00:27:49 by rags