Click here to Skip to main content
15,919,434 members
Home / Discussions / C#
   

C#

 
GeneralRe: TCP Header structure Pin
95ulisse19-Sep-10 9:08
95ulisse19-Sep-10 9:08 
GeneralRe: TCP Header structure Pin
Dave Kreskowiak19-Sep-10 9:56
mveDave Kreskowiak19-Sep-10 9:56 
QuestionPInvoke Pin
Saksida Bojan19-Sep-10 0:08
Saksida Bojan19-Sep-10 0:08 
AnswerRe: PInvoke Pin
Luc Pattyn19-Sep-10 3:23
sitebuilderLuc Pattyn19-Sep-10 3:23 
GeneralRe: PInvoke Pin
Saksida Bojan19-Sep-10 3:59
Saksida Bojan19-Sep-10 3:59 
AnswerRe: PInvoke Pin
Luc Pattyn19-Sep-10 4:16
sitebuilderLuc Pattyn19-Sep-10 4:16 
QuestionWhy i get an exception on this code ? ( code attached ) Pin
Yanshof18-Sep-10 21:53
Yanshof18-Sep-10 21:53 
AnswerRe: Why i get an exception on this code ? ( code attached ) Pin
Paul Michalik18-Sep-10 23:32
Paul Michalik18-Sep-10 23:32 
GeneralRe: Why i get an exception on this code ? ( code attached ) Pin
Yanshof18-Sep-10 23:49
Yanshof18-Sep-10 23:49 
AnswerRe: Why i get an exception on this code ? ( code attached ) Pin
Saksida Bojan19-Sep-10 1:19
Saksida Bojan19-Sep-10 1:19 
AnswerRe: Why i get an exception on this code ? ( code attached ) Pin
Manfred Rudolf Bihy19-Sep-10 22:11
professionalManfred Rudolf Bihy19-Sep-10 22:11 
Questionexcel import wizard (fixed line) Pin
eyeshield2118-Sep-10 15:16
eyeshield2118-Sep-10 15:16 
QuestionAnyone have an RDLC Example with SQL Server 2008 R2 Pin
gmhanna18-Sep-10 7:01
gmhanna18-Sep-10 7:01 
AnswerRe: Anyone have an RDLC Example with SQL Server 2008 R2 Pin
Mycroft Holmes18-Sep-10 17:16
professionalMycroft Holmes18-Sep-10 17:16 
QuestionCustom look for NumericUpDown control Pin
Mazdak18-Sep-10 1:05
Mazdak18-Sep-10 1:05 
AnswerRe: Custom look for NumericUpDown control Pin
OriginalGriff18-Sep-10 6:13
mveOriginalGriff18-Sep-10 6:13 
GeneralRe: Custom look for NumericUpDown control Pin
Mazdak18-Sep-10 6:16
Mazdak18-Sep-10 6:16 
GeneralRe: Custom look for NumericUpDown control Pin
OriginalGriff18-Sep-10 6:25
mveOriginalGriff18-Sep-10 6:25 
QuestionHow can i define the ConcurrentQueue size ? Pin
Yanshof18-Sep-10 0:48
Yanshof18-Sep-10 0:48 
Questioncopy control with relative code Pin
behzadcp18-Sep-10 0:38
professionalbehzadcp18-Sep-10 0:38 
AnswerRe: copy control with relative code Pin
Saksida Bojan18-Sep-10 23:59
Saksida Bojan18-Sep-10 23:59 
QuestionpInvoke Struct Pin
Saksida Bojan17-Sep-10 22:18
Saksida Bojan17-Sep-10 22:18 
AnswerRe: pInvoke Struct Pin
#realJSOP18-Sep-10 1:03
professional#realJSOP18-Sep-10 1:03 
GeneralRe: pInvoke Struct Pin
Saksida Bojan18-Sep-10 2:13
Saksida Bojan18-Sep-10 2:13 
AnswerRe: pInvoke Struct Pin
DaveyM6918-Sep-10 5:05
professionalDaveyM6918-Sep-10 5:05 
Saksida Bojan wrote:
strut should be intalized inside constructior


Correct, however every struct has a default parameterless constructor that cannot be overridden. If you are creating your own constructor (with parameters) then you would need to need to initialize every field inside that constructor.

Nothing to do with your question, but *sometimes* when PInvoking you can interchange int/uint. The size of the struct you have declared will be 296 bytes on a 32 bit system and 300 bytes on a 64 bit system. This is well within the range of an int so you can safely declaredwSize as an int (still 4 bytes) and get rid of the cast to uint when calculating the size.
Dave

Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.
Astonish us. Be exceptional. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)



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.