Click here to Skip to main content
15,887,267 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6910-Sep-10 0:28
professionalDaveyM6910-Sep-10 0:28 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds10-Sep-10 0:33
whiteclouds10-Sep-10 0:33 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6911-Sep-10 22:25
professionalDaveyM6911-Sep-10 22:25 
GeneralRe: How to call the function in cellcore.dll? [modified] Pin
whiteclouds12-Sep-10 17:45
whiteclouds12-Sep-10 17:45 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6913-Sep-10 12:52
professionalDaveyM6913-Sep-10 12:52 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds13-Sep-10 15:33
whiteclouds13-Sep-10 15:33 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6914-Sep-10 8:25
professionalDaveyM6914-Sep-10 8:25 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds14-Sep-10 17:00
whiteclouds14-Sep-10 17:00 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6914-Sep-10 21:41
professionalDaveyM6914-Sep-10 21:41 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds16-Sep-10 23:53
whiteclouds16-Sep-10 23:53 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6918-Sep-10 2:33
professionalDaveyM6918-Sep-10 2:33 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds18-Sep-10 3:33
whiteclouds18-Sep-10 3:33 
QuestionPassing array of c# objects to vbscript [modified] Pin
scootyohansen9-Sep-10 22:03
scootyohansen9-Sep-10 22:03 
QuestionValidating string values Pin
Ramkithepower9-Sep-10 21:54
Ramkithepower9-Sep-10 21:54 

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.