Search Results

Search found 3 results on 1 pages for 'smartjj'.

Page 1/1 | 1 

  • How to marshal the type of "Cstring" in .NET Compact Framework(C#)?

    - by SmartJJ
    How to marshal the type of "Cstring" in .NET Compact Framework(C#)? DLLname:Test_Cstring.dll(OS is WinCE 5.0),source code: extern "C" __declspec(dllexport) int GetStringLen(CString str) { return str.GetLength(); } I marshal that in .NET Compact Framework(C#),for example: [DllImport("Test_Cstring.dll", EntryPoint = "GetStringLen", SetLastError = true)] public extern static int GetStringLen(string s); private void Test_Cstring() { int len=-1; len=GetStringLen("abcd"); MessageBox.Show("Length:"+len.ToString()); //result is -1,so PInvoke is unsuccessful! } The Method of "GetStringLen" in .NET CF is unsuccessful! How to marshal this type of "Cstring"? Any information about it would be very appreciated!

    Read the article

  • What is AGL on .NET Compact Framework?

    - by SmartJJ
    What is AGL on .NET Compact Framework?? Any information about it would be very appreciated! For Example(Code from .NET Compact Framework): DllImport("AGL", EntryPoint="@106")] public static extern PAL_ERROR Blt(IntPtr howThis, IntPtr howSrc, ref RC rcSrc, ref RC rcDst, int cvKey, AGL_BLT md); public void Save(Stream stream, ImageFormat format) { if (stream == null) { throw new ArgumentNullException("stream"); } if (!stream.CanSeek || !stream.CanWrite) { throw new ArgumentException(); } MISC.HandleAr(GL.SaveImage(this.m_how, format.m_imgfmt, StreamWrapper.CreateStreamCallback(stream))); }

    Read the article

1