Delphi Prism getting Unknown Identifier "DllImport" error -


i'm trying call window's sendmessage method in delphi prism, i've declared class follow:

type   myutils = public static class   private     [dllimport("user32.dll", charset := charset.auto)]     method sendmessage(hwnd:intptr; msg:uint32; wparam:intptr; lparam:intptr):intptr; external;   protected   public   end; 

when tried compile, error unknown identifier "dllimport"

i used example, how call function createprocess in delphi prism? , syntax looks same. there setting need enable, or have syntax error?

make sure import (use) system.runtime.interopservices. that's dllimport attribute defined.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -