473,385 Members | 1,898 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

DEVMODE Structure from C to C# something is missing

Hi,
I have a structure I have to use called DEVMODE for when I want to call
EnumDisplaySettings. you can see the C struct at the address below :

http://msdn.microsoft.com/library/de...tspol_8nle.asp

I want to use the dmPosition member of this struct... Unfortunatly all the
translations of this struct from C to C# are missing this element and I
wanted to know if someone here know how to integrate this exact element in
the managed struct... one of the structs I found (and they all look like
this one) is there :

http://www.pinvoke.net/default.aspx/Structures.DEVMODE

if you look carefully, there are 3 members missing in this translation :
dmPosition, dmDisplayOrientation and dmDisplayFixedOutput... For what I'm
doing the 2 firsts can be very useful and dmPosition is mandatory, but I
absolutely don't know how to integrate those in the C# struct.

Does someone have any idea on how to do it?

thanks
Aug 14 '06 #1
1 5662
ThunderMusic,

I would say that the VB definition that you refer to on PInvoke.net is
wrong. There is no POINTL structure exposed in VB, AFAIK.

You can create the definition yourself. POINTL is simply defined as:

[StructLayout(LayoutKind.Sequential)]
public struct POINTL
{
public int x;
public int y
}

You can then define the DEVMODE structure correctly. Once you do,
please update PInvoke.net as well =)

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"ThunderMusic" <No*************************@NoSpAm.comwrote in message
news:uY**************@TK2MSFTNGP03.phx.gbl...
Hi,
I have a structure I have to use called DEVMODE for when I want to call
EnumDisplaySettings. you can see the C struct at the address below :

http://msdn.microsoft.com/library/de...tspol_8nle.asp

I want to use the dmPosition member of this struct... Unfortunatly all
the translations of this struct from C to C# are missing this element and
I wanted to know if someone here know how to integrate this exact element
in the managed struct... one of the structs I found (and they all look
like this one) is there :

http://www.pinvoke.net/default.aspx/Structures.DEVMODE

if you look carefully, there are 3 members missing in this translation :
dmPosition, dmDisplayOrientation and dmDisplayFixedOutput... For what I'm
doing the 2 firsts can be very useful and dmPosition is mandatory, but I
absolutely don't know how to integrate those in the C# struct.

Does someone have any idea on how to do it?

thanks

Aug 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Thomas Matthews | last post by:
Hi, Given a structure of pointers: struct Example_Struct { unsigned char * ptr_buffer; unsigned int * ptr_numbers; }; And a function that will accept the structure:
0
by: Eric | last post by:
Hi, I've been trying in vain to get the number of copies a user wants to print after they've closed the PrintDialog form. Apparantly this value is sometimes found in the DEVMODE struct for the...
0
by: heino | last post by:
Hello I am trying to understand how to use GetHdevmode/SetHdevmode to set public and private portions of DEVMODE structure. Is there any example in C# .Net framework that shows how to...
0
by: heino | last post by:
Hello I am trying to use GetHdevmode/SetHdevmode to set public and private portions of DEVMODE structure. Can any one post an example in C# .Net framework that shows how to change...
0
by: active | last post by:
I use Devmode and SetPrinter to set the default printer to landscape. I check using the Windows XP "Printers and Faxes" menu item. The printer driver reports landscape. I then use...
0
by: Flavio Zanellato | last post by:
Hello, anybody has worked with the DEVMODE structure and the page settings properties ? I've not seen a way to - get the actual DEVMODE data from a default printer - change any setting -...
7
by: Jake Thompson | last post by:
Hello I created a DLL that has a function that is called from my main c program. In my exe I first get a a pointer to the address of the function by using GetProcAddress and on the dll side I...
4
by: gladhuman | last post by:
Hi, Let's assume that I have the following structure and the following array: struc My_struct { char var_one; char var_two; char var_three;
1
by: ThunderMusic | last post by:
Hi, I have a structure I have to use called DEVMODE for when I want to call EnumDisplaySettings. you can see the C struct at the address below : ...
1
by: rhaas | last post by:
Howdy. I've been trying to parse the return of XML::TreePP from an xBRL file using perl and Data::Dumper. The resulting Data::Dumper output looks like this: $VAR1 = { 'xbrl' =>...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.