Click here to Skip to main content
15,896,063 members
Home / Discussions / C#
   

C#

 
GeneralRe: Regular Expressions Pin
Bassam Abdul-Baki10-Sep-10 5:02
professionalBassam Abdul-Baki10-Sep-10 5:02 
GeneralRe: Regular Expressions Pin
PIEBALDconsult10-Sep-10 14:52
mvePIEBALDconsult10-Sep-10 14:52 
GeneralRe: Regular Expressions [modified] Pin
PIEBALDconsult11-Sep-10 4:30
mvePIEBALDconsult11-Sep-10 4:30 
Questionis C# in .Net 3.5 slower than C# in .Net 1.1 Pin
RugbyLeague10-Sep-10 2:20
RugbyLeague10-Sep-10 2:20 
AnswerRe: is C# in .Net 3.5 slower than C# in .Net 1.1 Pin
Luc Pattyn10-Sep-10 3:03
sitebuilderLuc Pattyn10-Sep-10 3:03 
GeneralRe: is C# in .Net 3.5 slower than C# in .Net 1.1 Pin
RugbyLeague10-Sep-10 3:11
RugbyLeague10-Sep-10 3:11 
AnswerRe: is C# in .Net 3.5 slower than C# in .Net 1.1 Pin
Luc Pattyn10-Sep-10 3:17
sitebuilderLuc Pattyn10-Sep-10 3:17 
GeneralRe: is C# in .Net 3.5 slower than C# in .Net 1.1 Pin
RugbyLeague10-Sep-10 3:21
RugbyLeague10-Sep-10 3:21 
GeneralRe: is C# in .Net 3.5 slower than C# in .Net 1.1 Pin
RugbyLeague10-Sep-10 5:48
RugbyLeague10-Sep-10 5:48 
GeneralRe: is C# in .Net 3.5 slower than C# in .Net 1.1 Pin
Luc Pattyn10-Sep-10 5:53
sitebuilderLuc Pattyn10-Sep-10 5:53 
GeneralRe: is C# in .Net 3.5 slower than C# in .Net 1.1 Pin
RugbyLeague10-Sep-10 5:55
RugbyLeague10-Sep-10 5:55 
GeneralRe: is C# in .Net 3.5 slower than C# in .Net 1.1 Pin
Luc Pattyn10-Sep-10 6:02
sitebuilderLuc Pattyn10-Sep-10 6:02 
Questionchar[] to string conversion Pin
Chesnokov Yuriy10-Sep-10 1:57
professionalChesnokov Yuriy10-Sep-10 1:57 
AnswerRe: char[] to string conversion Pin
Kubajzz10-Sep-10 2:04
Kubajzz10-Sep-10 2:04 
AnswerRe: char[] to string conversion Pin
OriginalGriff10-Sep-10 2:31
mveOriginalGriff10-Sep-10 2:31 
QuestionHow to call the function in cellcore.dll? Pin
whiteclouds9-Sep-10 22:52
whiteclouds9-Sep-10 22:52 
AnswerRe: How to call the function in cellcore.dll? Pin
DaveyM699-Sep-10 23:42
professionalDaveyM699-Sep-10 23:42 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds10-Sep-10 0:09
whiteclouds10-Sep-10 0:09 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6910-Sep-10 0:20
professionalDaveyM6910-Sep-10 0:20 
GeneralRe: How to call the function in cellcore.dll? Pin
Luc Pattyn10-Sep-10 1:26
sitebuilderLuc Pattyn10-Sep-10 1:26 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6910-Sep-10 1:41
professionalDaveyM6910-Sep-10 1:41 
GeneralRe: How to call the function in cellcore.dll? Pin
Luc Pattyn10-Sep-10 1:59
sitebuilderLuc Pattyn10-Sep-10 1:59 
Hi Dave,

This is the original definition from MSDN:
typedef struct lineinitializeexparams_tag {
  DWORD dwTotalSize;
  DWORD dwNeededSize;
  DWORD dwUsedSize;
  DWORD dwOptions;
  union {
    HANDLE hEvent;
    HANDLE hCompletionPort;
  } Handles;
  DWORD dwCompletionKey;
} LINEINITIALIZEEXPARAMS, *LPLINEINITIALIZEEXPARAMS;


in C/C++ every struct member that is not inside a union block will be layed out sequentially; and everything inside a union block will share the same memory (and needs the size of the largest item), so here hEvent and hCompletionPort are overlapping, however dwCompletionKey (not being part of the union) must be at the next suitable address following the union, hence at start of union item plus 4 ot 8 depending on pointer sizes.

BTW: there seems to be a dwOptions member too, which hasn't been mentioned before!

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6910-Sep-10 2:09
professionalDaveyM6910-Sep-10 2:09 
GeneralRe: How to call the function in cellcore.dll? Pin
Luc Pattyn10-Sep-10 2:17
sitebuilderLuc Pattyn10-Sep-10 2:17 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6910-Sep-10 2:19
professionalDaveyM6910-Sep-10 2:19 

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.