Click here to Skip to main content
15,898,947 members
Home / Discussions / C#
   

C#

 
GeneralRe: Passing null Pin
Paul Riley2-Sep-02 8:17
Paul Riley2-Sep-02 8:17 
GeneralRe: Passing null Pin
Nnamdi Onyeyiri2-Sep-02 8:25
Nnamdi Onyeyiri2-Sep-02 8:25 
GeneralRe: Passing null Pin
leppie2-Sep-02 9:17
leppie2-Sep-02 9:17 
GeneralRe: Passing null Pin
Nnamdi Onyeyiri2-Sep-02 9:23
Nnamdi Onyeyiri2-Sep-02 9:23 
GeneralRe: Passing null Pin
leppie2-Sep-02 12:11
leppie2-Sep-02 12:11 
GeneralRe: Passing null Pin
Rickard Andersson202-Sep-02 10:45
Rickard Andersson202-Sep-02 10:45 
GeneralDisplay Mode Pin
Nnamdi Onyeyiri2-Sep-02 2:22
Nnamdi Onyeyiri2-Sep-02 2:22 
GeneralRe: Display Mode Pin
leppie2-Sep-02 3:00
leppie2-Sep-02 3:00 
I think the exception lies with string lpszDeviceName being null.

You mite want to redefine:

[DllImport("User32.dll")]
public static extern bool EnumDisplaySettings(StringBuidler lpszDeviceName, int iModeNum, DEVMODE lpDevMode);

Then when calling do StringBuilder devname = new StringBuilder( insert const size here).

Also , many times you need to set the size of a struct. In this case, according to MSDN, you will need to.

Nnamdi Onyeyiri wrote:
i couldnt find what CCHFORMNAME is so i just used the MarshalAs Attribute like this

This you will find the value in the header files, so download the Platform SDK if you dont have it already.

Hope this helps

MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc
for more info. Big Grin | :-D
GeneralRe: Display Mode Pin
Nnamdi Onyeyiri2-Sep-02 3:16
Nnamdi Onyeyiri2-Sep-02 3:16 
GeneralRe: Display Mode Pin
leppie2-Sep-02 3:31
leppie2-Sep-02 3:31 
GeneralRe: Display Mode Pin
Nnamdi Onyeyiri2-Sep-02 3:39
Nnamdi Onyeyiri2-Sep-02 3:39 
GeneralRe: Display Mode - SOLUTION :) Pin
leppie2-Sep-02 4:02
leppie2-Sep-02 4:02 
GeneralRe: Display Mode - SOLUTION :) Pin
Nnamdi Onyeyiri2-Sep-02 4:51
Nnamdi Onyeyiri2-Sep-02 4:51 
GeneralRe: Display Mode - SOLUTION :) Pin
leppie2-Sep-02 5:02
leppie2-Sep-02 5:02 
GeneralRe: Display Mode - SOLUTION :) Pin
Paul Riley2-Sep-02 5:57
Paul Riley2-Sep-02 5:57 
GeneralRe: Display Mode - SOLUTION :) Pin
leppie2-Sep-02 6:12
leppie2-Sep-02 6:12 
GeneralRe: Display Mode - SOLUTION :) Pin
Paul Riley2-Sep-02 8:00
Paul Riley2-Sep-02 8:00 
GeneralRe: Display Mode - SOLUTION :) Pin
Paul Ingles2-Sep-02 7:52
Paul Ingles2-Sep-02 7:52 
GeneralRe: Display Mode - SOLUTION :) Pin
James T. Johnson2-Sep-02 9:38
James T. Johnson2-Sep-02 9:38 
GeneralRe: Display Mode - SOLUTION :) Pin
Paul Riley2-Sep-02 9:52
Paul Riley2-Sep-02 9:52 
QuestionArray of strings to old DLL? Pin
EdgarBM1-Sep-02 23:25
EdgarBM1-Sep-02 23:25 
AnswerRe: Array of strings to old DLL? Pin
Stephane Rodriguez.1-Sep-02 23:38
Stephane Rodriguez.1-Sep-02 23:38 
GeneralRe: Array of strings to old DLL? Pin
EdgarBM2-Sep-02 1:14
EdgarBM2-Sep-02 1:14 
GeneralRe: Array of strings to old DLL? Pin
Stephane Rodriguez.2-Sep-02 1:33
Stephane Rodriguez.2-Sep-02 1:33 
GeneralRe: Array of strings to old DLL? Pin
EdgarBM2-Sep-02 1:52
EdgarBM2-Sep-02 1:52 

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.