I wrote below dll called djj.dll it has a file called try.cpp with following code
#include<stdio.h>
int print(){
return 4;
}
Now, i build this dll and go to python idle.
I type print windll.djj.print . It gives syntax error .WHY??
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As Aaron Gallagher said,
printis a Python keyword. Also it’s unusual for a compiled DLL to use the standard Windows calling convention (i.e. windll). It’s more likely to use cdecl (i.e. cdll). Here’s an approach that should work: