could someone explain me why I have error in my sample code?:
struct resbuf* Wskaznik;
int OldOsnap = acedGetVar(_T("OSMODE"), &Wskaznik); // here is error
Error 1 error C2664: 'acedGetVar' : cannot convert parameter 2 from 'resbuf **' to 'resbuf *'
I want to get system variable "OSMODE" and use it in other place in my code.
I declare OldOsnap: public: int OldOsnap;
Where I can found a good examples to use "resbuf"?
The docs for acedGetVar() very clearly state that the second argument must be a pointer to an allocated resbuf. In your code you are passing in the address of a pointer to resbuf. You need to change:
struct resbuf Wskaznik;
and get rid of the acutRelRb() call since your resbuf is now on the stack and will be freed automatically when it goes out of scope.
Thank's you artc2 for your help
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.