في البداية السلام عليكم اخواني
اواجه مشكلة في استدعاء dll file عن طريق السي شارب .....حيث اني اقوم بتحويل كود من السي بلس بلس الي سي شارب
كود سي بلس بلس هو :
كود:
// Define the CLSID of coclasses
extern "C" const GUID __declspec(selectany) LIBID_PAGEANALYZERLib =
{0xa120e7cc,0x6971,0x43a8,{0x93,0xcd,0xda,0x67,0x15,0x1b,0x63,0x17}};
extern "C" const GUID __declspec(selectany) CLSID_LayoutAnalyzer2 =
{0xa0205d6d,0x1674,0x4664,{0xb0,0x4f,0x8d,0x28,0x6d,0x5f,0xa9,0x91}};
كود سي شارب هو :
كود:
[DllImport("PageAnalyzer.dll", EntryPoint = "LIBID_PAGEANALYZERLib", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
static extern Guid LIBID_PAGEANALYZERLib = { 0xa120e7cc, 0x6971, 0x43a8, { 0x93, 0xcd, 0xda, 0x67, 0x15, 0x1b, 0x63, 0x17 } };
[DllImport("PageAnalyzer.dll", EntryPoint = "CLSID_LayoutAnalyzer2", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
static extern Guid CLSID_LayoutAnalyzer2 = { 0xa120e7cc, 0x6971, 0x43a8, { 0x93, 0xcd, 0xda, 0x67, 0x15, 0x1b, 0x63, 0x17 } };
المشكلة التي تظهر لي هيه The modifier 'extern' is not valid for this item
ارجوكم المساعدة باسرع وقت ممكن
المفضلات