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:
In my main app I have a variable :
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:
I get :
at compile time.
What am i doing wrong?
thanks
rags
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
Try:
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
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
Hi Rags
I think that this should work:
or
I prefer the first form.
Regards,
Biterider
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
I think that this should work:
mov ecx, .pFileDlg
mov eax, .FileDlgObjects.pFileName
It worked, thank you. :lol:
Rags