Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
AnswerRe: Text to speech Pin
April Fans12-Jan-10 19:21
April Fans12-Jan-10 19:21 
AnswerRe: Text to speech Pin
carlecomm12-Jan-10 19:28
carlecomm12-Jan-10 19:28 
QuestionWindows 7 x64 Pin
AlucardCode11-Jan-10 19:16
AlucardCode11-Jan-10 19:16 
AnswerRe: Windows 7 x64 PinPopular
Dave Kreskowiak12-Jan-10 3:47
mveDave Kreskowiak12-Jan-10 3:47 
AnswerRe: Windows 7 x64 Pin
April Fans12-Jan-10 19:16
April Fans12-Jan-10 19:16 
QuestionHow to invoke function from a dll? Pin
城市浪子11-Jan-10 19:01
城市浪子11-Jan-10 19:01 
AnswerRe: How to invoke function from a dll? Pin
Rick Shaub12-Jan-10 4:06
Rick Shaub12-Jan-10 4:06 
GeneralRe: How to invoke function from a dll? Pin
城市浪子13-Jan-10 16:54
城市浪子13-Jan-10 16:54 
autually ,i had declare the prototype as below:
[StructLayout(LayoutKind.Sequential)]
public struct LPRImage
{
public int size;
public int nChannels;
public int depth; public int nColorMode;
public int dataOrder;
public int origin;
public int width;
public int height;
public int imageSize;
[MarshalAs(UnmanagedType.ByValArray)]
public byte[] pData;
public int step;
public SYSTEMTIME timeStamp;
}

public static extern int LPRLoadImage([System.Runtime.InteropServices.InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)] string pFilePath, ref System.IntPtr ppImage);

but i don't know how to call the LPRLoadImage function,because ppImage is a pointer,i call like below:

LPRStructure.LPRImage Image = new LPRStructure.LPRImage();
IntPtr pImge = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(LPRStructure.LPRImage)));
Marshal.StructureToPtr(Image, pImge, false);
int i = LPRRender.LPRLoadImage(s, ref pImge);

when i run this,the return value i = -2 [-2 :invalid parameter ]
i think the ppImage is a pointer which point to the pointer of struct,how can i transfer the ppImage parameter to the function?
GeneralRe: How to invoke function from a dll? [modified] Pin
Rick Shaub14-Jan-10 2:51
Rick Shaub14-Jan-10 2:51 
GeneralRe: How to invoke function from a dll? Pin
城市浪子19-Jan-10 17:53
城市浪子19-Jan-10 17:53 
AnswerRe: How to invoke function from a dll? Pin
April Fans12-Jan-10 16:47
April Fans12-Jan-10 16:47 
QuestionOpen folder with file selected Pin
Kim061811-Jan-10 18:20
Kim061811-Jan-10 18:20 
AnswerRe: Open folder with file selected Pin
Alan N12-Jan-10 2:22
Alan N12-Jan-10 2:22 
AnswerRe: Open folder with file selected Pin
carlecomm12-Jan-10 19:31
carlecomm12-Jan-10 19:31 
QuestionRefresh comboxbox in form1 after form2 is closed Pin
misCafe11-Jan-10 17:36
misCafe11-Jan-10 17:36 
AnswerRe: Refresh comboxbox in form1 after form2 is closed Pin
Kubajzz11-Jan-10 18:05
Kubajzz11-Jan-10 18:05 
GeneralRe: Refresh comboxbox in form1 after form2 is closed Pin
misCafe11-Jan-10 19:06
misCafe11-Jan-10 19:06 
GeneralRe: Refresh comboxbox in form1 after form2 is closed Pin
Kubajzz11-Jan-10 19:13
Kubajzz11-Jan-10 19:13 
GeneralRe: Refresh comboxbox in form1 after form2 is closed Pin
misCafe11-Jan-10 19:41
misCafe11-Jan-10 19:41 
GeneralRe: Refresh comboxbox in form1 after form2 is closed Pin
<<Tash18>>11-Jan-10 21:24
<<Tash18>>11-Jan-10 21:24 
GeneralRe: Refresh comboxbox in form1 after form2 is closed Pin
Rajeshwari Laxmanan30-Mar-10 21:34
Rajeshwari Laxmanan30-Mar-10 21:34 
QuestionFormBorderStyle problem Pin
roshihans11-Jan-10 17:21
roshihans11-Jan-10 17:21 
QuestionIcon Transparency When Working With PictureBox Control... Pin
Thomas Kemper11-Jan-10 13:20
Thomas Kemper11-Jan-10 13:20 
AnswerRe: Icon Transparency When Working With PictureBox Control... Pin
Tsuda Kageyu19-May-10 0:15
Tsuda Kageyu19-May-10 0:15 
QuestionByte Array Pin
o m n i11-Jan-10 12:36
o m n i11-Jan-10 12:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.