How should such declaration be converted to delphi?
void method (void *pixels);
And I have also the information that I should pre-allocate that variable.
could someone give me a hint?
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.
If you need to stick to the original declaration format (as for example when converting C DLL headers), and the conversion would be:
You can find dome more information on converting C headers to Delphi here
On the other hand, if you are converting the whole method or class you might want to adapt it to a more Delphi-like code. I do not know what “pixels” is, so I can hardly guess which would be the best option.
On a wild guess, if it is a matrix with some information about each pixel (position, color, alpha channel?) you can easily handle such a structure like that with object lists or create your own class to handle it.
HTH