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

C#

 
QuestionAccess create table from the app ... Pin
Sharpoverride12-Sep-05 2:45
Sharpoverride12-Sep-05 2:45 
AnswerRe: Access create table from the app ... Pin
Guffa12-Sep-05 3:09
Guffa12-Sep-05 3:09 
QuestionOpenFile and SaveFile dialogs change the current directory. Pin
Sharpoverride12-Sep-05 2:41
Sharpoverride12-Sep-05 2:41 
AnswerRe: OpenFile and SaveFile dialogs change the current directory. Pin
S. Senthil Kumar12-Sep-05 4:01
S. Senthil Kumar12-Sep-05 4:01 
AnswerRe: OpenFile and SaveFile dialogs change the current directory. Pin
Dave Kreskowiak12-Sep-05 5:52
mveDave Kreskowiak12-Sep-05 5:52 
AnswerRe: OpenFile and SaveFile dialogs change the current directory. Pin
Large Data File13-Sep-05 22:14
Large Data File13-Sep-05 22:14 
Questionpinvoke a C++ struct to C# Pin
Thomas van Veen12-Sep-05 2:27
Thomas van Veen12-Sep-05 2:27 
AnswerRe: pinvoke a C++ struct to C# Pin
Andy Moore12-Sep-05 13:00
Andy Moore12-Sep-05 13:00 
Tom,

You would do this

[StructLayout(LayoutKind.Explicit)]<br />
public struct _IMAGE_SECTION_HEADER<br />
{<br />
    [FieldOffset(0)]<br />
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = IMAGE_SIZEOF_SHORT_NAME)]<br />
    public byte[] Name;<br />
<br />
    [FieldOffset(IMAGE_SIZEOF_SHORT_NAME)]<br />
    public int PhysicalAddress;<br />
<br />
    [FieldOffset(IMAGE_SIZEOF_SHORT_NAME)]<br />
    public int VirtualSize;<br />
<br />
    ...<br />
<br />
}


You basically put the members of the union at the same offset in the structure.

I hope this helps.



Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons
Question[Message Deleted] Pin
sahithya harsha12-Sep-05 2:24
sahithya harsha12-Sep-05 2:24 
AnswerRe: help me plz.... Pin
Dave Kreskowiak12-Sep-05 6:02
mveDave Kreskowiak12-Sep-05 6:02 
General[Message Deleted] Pin
sahithya harsha12-Sep-05 13:42
sahithya harsha12-Sep-05 13:42 
GeneralRe: help me plz.... Pin
Dave Kreskowiak12-Sep-05 15:46
mveDave Kreskowiak12-Sep-05 15:46 
QuestionHi , Is there any way to Get HTTP Headers of a Page other then HttpWebRequest Pin
Tariq Rahim12-Sep-05 2:01
Tariq Rahim12-Sep-05 2:01 
AnswerRe: Hi , Is there any way to Get HTTP Headers of a Page other then HttpWebRequest Pin
Guffa12-Sep-05 3:40
Guffa12-Sep-05 3:40 
GeneralRe: Hi , Is there any way to Get HTTP Headers of a Page other then HttpWebRequest Pin
Tariq Rahim12-Sep-05 3:54
Tariq Rahim12-Sep-05 3:54 
QuestionUsing dll that built by VC++ in C# Pin
lucdt12-Sep-05 1:59
lucdt12-Sep-05 1:59 
QuestionReally capturing a window Pin
bluechipmunk12-Sep-05 0:51
bluechipmunk12-Sep-05 0:51 
AnswerRe: Really capturing a window Pin
Daniel Turini12-Sep-05 1:27
Daniel Turini12-Sep-05 1:27 
QuestionBasic Insert Please correct Pin
dabuskol12-Sep-05 0:19
dabuskol12-Sep-05 0:19 
AnswerRe: Basic Insert Please correct Pin
LeenaSo12-Sep-05 0:44
LeenaSo12-Sep-05 0:44 
AnswerRe: Basic Insert Please correct Pin
mav.northwind12-Sep-05 0:46
mav.northwind12-Sep-05 0:46 
QuestionDrawing an arc Pin
11-Sep-05 23:52
suss11-Sep-05 23:52 
AnswerRe: Drawing an arc Pin
Guffa12-Sep-05 6:31
Guffa12-Sep-05 6:31 
GeneralRe: Drawing an arc Pin
subramanyeswari13-Sep-05 0:53
subramanyeswari13-Sep-05 0:53 
QuestionTabIndex of multiple usercontrols Pin
JorisFromHolland11-Sep-05 23:08
JorisFromHolland11-Sep-05 23:08 

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.