Search code examples
axaptadynamics-ax-2012x++dynamics-ax-2012-r2dynamics-ax-2012-r3

Operand types are not compatible with the operator in ax 2012


for bellow code i am getting the error like Operand types are not compatible with the operator. operand types are as followed.

str fileName;
int hfile;
hfile = WinAPIServer::createFile(fileName); 

the code is directly copied from the bellow link.

Link For The code from Where i Copied it


Solution

  • The return type of createFile is void so you can't assign the 'return value' of it to any variable. Consequently the code shown on that site either is wrong or their method signature of createFile is different to ours