Hello,
could someone explain me why I have error in my sample code?:
struct resbuf* Wskaznik;
int OldOsnap = acedGetVar(_T("OSMODE"), &Wskaznik); // here is error
acutRelRb(Wskaznik);
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"?
regards,
ZibiK
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;
to this:
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.