Click here to Skip to main content
15,889,874 members
Home / Discussions / C#
   

C#

 
AnswerRe: Issue with Imultiple result sets Pin
Richard MacCutchan1-Oct-11 2:26
mveRichard MacCutchan1-Oct-11 2:26 
AnswerRe: Issue with Imultiple result sets Pin
Dave Kreskowiak1-Oct-11 2:48
mveDave Kreskowiak1-Oct-11 2:48 
GeneralRe: Issue with Imultiple result sets Pin
siva4551-Oct-11 18:02
siva4551-Oct-11 18:02 
GeneralRe: Issue with Imultiple result sets Pin
Dave Kreskowiak2-Oct-11 1:56
mveDave Kreskowiak2-Oct-11 1:56 
AnswerRe: Issue with Imultiple result sets Pin
BobJanova2-Oct-11 22:22
BobJanova2-Oct-11 22:22 
QuestionCrystal reports Pin
Neha_Gupta30-Sep-11 20:20
Neha_Gupta30-Sep-11 20:20 
AnswerRe: Crystal reports Pin
Dave Kreskowiak1-Oct-11 2:46
mveDave Kreskowiak1-Oct-11 2:46 
QuestionUsing SystemParametersInfo() P/Invoke Pin
namelkcip30-Sep-11 19:40
namelkcip30-Sep-11 19:40 
I'm trying to understand how to use the P/Invoke method SystemParametersInfo() to get some information from my mobile computer. I am ok with the following requirements:

C#
using System.Runtime.InteropServices;

[DllImport("coredll.dll")]
private static extern int SystemParametersInfo(uint uiAction, uint uiParam, StringBuilder pvParam, uint fWiniIni);


with a question regarding the 'pvParam' parameter. I have seen it used as StringBuilder, string, int, etc. If I type it as a string, does that limit the types of uiActions and uiParams I can return? Do I have to re-construct it with a different type for the 'pvParam' for others? I apologize that this is a bit confusing, but the document on MSDN shows the constructor and the parameters, but it's difficult to figure out exactly how to use it from that. My final source of confusion, and this is the one I'm really hung up on, is why I have to perform the following:

C#
private const uint SPI_GETPLATFORMTYPE = 257;
private const uint SPI_GETOEMINFO = 258;


I don't understand why I have to specify an int value, and does the value matter? I see that it happens to be the next two values after 256, which seems significant but I'm not sure why. I can't find any documentation that shows that this is what I must do in order to use something like SPI_GETOEMINFO, nor can I find an explanation for the use of '258'.

Regards,
Scott
AnswerRe: Using SystemParametersInfo() P/Invoke Pin
OriginalGriff30-Sep-11 21:38
mveOriginalGriff30-Sep-11 21:38 
GeneralRe: Using SystemParametersInfo() P/Invoke Pin
namelkcip1-Oct-11 16:31
namelkcip1-Oct-11 16:31 
GeneralRe: Using SystemParametersInfo() P/Invoke Pin
OriginalGriff1-Oct-11 21:22
mveOriginalGriff1-Oct-11 21:22 
AnswerRe: Using SystemParametersInfo() P/Invoke Pin
DaveyM691-Oct-11 23:24
professionalDaveyM691-Oct-11 23:24 
GeneralRe: Using SystemParametersInfo() P/Invoke Pin
namelkcip5-Oct-11 16:50
namelkcip5-Oct-11 16:50 
GeneralRe: Using SystemParametersInfo() P/Invoke Pin
DaveyM696-Oct-11 6:44
professionalDaveyM696-Oct-11 6:44 
QuestionHow to Access Methods and Properties of a Private Class Pin
namelkcip30-Sep-11 19:24
namelkcip30-Sep-11 19:24 
AnswerRe: How to Access Methods and Properties of a Private Class Pin
Dave Kreskowiak1-Oct-11 2:43
mveDave Kreskowiak1-Oct-11 2:43 
GeneralRe: How to Access Methods and Properties of a Private Class Pin
SledgeHammer011-Oct-11 8:18
SledgeHammer011-Oct-11 8:18 
GeneralRe: How to Access Methods and Properties of a Private Class Pin
Dave Kreskowiak1-Oct-11 8:41
mveDave Kreskowiak1-Oct-11 8:41 
GeneralRe: How to Access Methods and Properties of a Private Class Pin
Eddy Vluggen1-Oct-11 8:42
professionalEddy Vluggen1-Oct-11 8:42 
GeneralRe: How to Access Methods and Properties of a Private Class Pin
SledgeHammer011-Oct-11 9:58
SledgeHammer011-Oct-11 9:58 
AnswerRe: How to Access Methods and Properties of a Private Class Pin
Eddy Vluggen1-Oct-11 11:49
professionalEddy Vluggen1-Oct-11 11:49 
GeneralRe: How to Access Methods and Properties of a Private Class Pin
Eddy Vluggen1-Oct-11 12:47
professionalEddy Vluggen1-Oct-11 12:47 
GeneralRe: How to Access Methods and Properties of a Private Class Pin
BillWoodruff1-Oct-11 18:30
professionalBillWoodruff1-Oct-11 18:30 
GeneralRe: How to Access Methods and Properties of a Private Class Pin
namelkcip1-Oct-11 16:33
namelkcip1-Oct-11 16:33 
GeneralRe: How to Access Methods and Properties of a Private Class Pin
BillWoodruff1-Oct-11 18:32
professionalBillWoodruff1-Oct-11 18:32 

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.