Click here to Skip to main content
16,015,504 members
Home / Discussions / C#
   

C#

 
GeneralRe: Speedup app startup time Pin
Kannan Kalyanaraman16-Apr-02 0:47
Kannan Kalyanaraman16-Apr-02 0:47 
GeneralRe: Speedup app startup time Pin
James T. Johnson16-Apr-02 6:56
James T. Johnson16-Apr-02 6:56 
GeneralRe: Speedup app startup time Pin
Kannan Kalyanaraman16-Apr-02 8:19
Kannan Kalyanaraman16-Apr-02 8:19 
GeneralRe: Speedup app startup time Pin
James T. Johnson16-Apr-02 11:45
James T. Johnson16-Apr-02 11:45 
GeneralGet remote object and respond to an event Pin
wzrd10-Apr-02 9:27
wzrd10-Apr-02 9:27 
GeneralHosting .NET controls in IE ***LOCALLY*** Pin
10-Apr-02 8:29
suss10-Apr-02 8:29 
GeneralConverting C structures to C# equivalents... Pin
10-Apr-02 1:29
suss10-Apr-02 1:29 
GeneralRe: Converting C structures to C# equivalents... Pin
James T. Johnson10-Apr-02 10:28
James T. Johnson10-Apr-02 10:28 
Dominique wrote:
public struct ISC_TIMESTAMP 
{ 
long TIMESTAMP_DATE; 
ulong TIMESTAMP_TIME; 
}; 


Is this correct or should I be using another more C# style like..

[StructLayout(LayoutKind.Sequential)] 
public class ISC_TIMESTAMP 
{ 
// rest of code goes here 
}


You need to use a combination of the two, keep it a struct but apply the StructLayout attribute its your only guarantee that the data will stay in that order; otherwise the compiler could move fields around to better align the data.

Dominique wrote:
struct blobcallback { 
short (ISC_FAR *blob_get_segment) 
(void ISC_FAR* hnd, unsigned char* buffer, ISC_USHORT buf_size, ISC_USHORT* result_len); 
void ISC_FAR *blob_handle; 
ISC_LONG blob_number_segments; 
ISC_LONG blob_max_segment; 
ISC_LONG blob_total_length; 
void (ISC_FAR *blob_put_segment) 
(void ISC_FAR* hnd, unsigned char* buffer, ISC_USHORT buf_size); 
ISC_LONG (ISC_FAR *blob_lseek) 
(void ISC_FAR* hnd, ISC_USHORT mode, ISC_LONG offset); 
}


Call backs are done with delegates, there is an article somewhere on CP that shows how to use a callback for the EnumWindows function, i think it was how to programmatcally control IE.

void is usually a object

When you have a character buffer pass in a StringBuilder object

A ** (pointer to a pointer) usually uses the 'out' keyword followed by its type, a pointer is usually a reference ('ref').

HTH,

James

Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971

GeneralVisual C# .NET Standard edition - missing features Pin
Mario123459-Apr-02 22:44
Mario123459-Apr-02 22:44 
GeneralRe: Visual C# .NET Standard edition - missing features Pin
ez210-Apr-02 7:19
ez210-Apr-02 7:19 
QuestionAre there any APIs in c# that i can use to parse a email message? Pin
Gentri Wind9-Apr-02 18:38
Gentri Wind9-Apr-02 18:38 
AnswerRe: Are there any APIs in c# that i can use to parse a email message? Pin
James T. Johnson9-Apr-02 19:25
James T. Johnson9-Apr-02 19:25 
GeneralRe: Are there any APIs in c# that i can use to parse a email message? Pin
Paul Watson21-Jun-02 7:05
sitebuilderPaul Watson21-Jun-02 7:05 
QuestionWhy so many class in framework sealed? Pin
9-Apr-02 17:49
suss9-Apr-02 17:49 
AnswerRe: Why so many class in framework sealed? Pin
Gerald Schwab9-Apr-02 17:54
Gerald Schwab9-Apr-02 17:54 
GeneralRe: Why so many class in framework sealed? Pin
9-Apr-02 20:01
suss9-Apr-02 20:01 
AnswerRe: Why so many class in framework sealed? Pin
James T. Johnson9-Apr-02 19:10
James T. Johnson9-Apr-02 19:10 
AnswerRe: Why so many class in framework sealed? Pin
Andy Smith9-Apr-02 20:10
Andy Smith9-Apr-02 20:10 
GeneralRe: Why so many class in framework sealed? Pin
Nick Parker10-Apr-02 6:42
protectorNick Parker10-Apr-02 6:42 
GeneralBitmap Button Pin
9-Apr-02 9:31
suss9-Apr-02 9:31 
GeneralRe: Bitmap Button Pin
James T. Johnson9-Apr-02 13:50
James T. Johnson9-Apr-02 13:50 
Generalswitch enhancement in C# Pin
ovarlamov9-Apr-02 8:27
ovarlamov9-Apr-02 8:27 
GeneralRe: switch enhancement in C# Pin
Andy Smith9-Apr-02 8:53
Andy Smith9-Apr-02 8:53 
GeneralReflection & Assemblies Pin
Tariq9-Apr-02 5:07
Tariq9-Apr-02 5:07 
GeneralRe: Reflection & Assemblies Pin
James T. Johnson9-Apr-02 6:30
James T. Johnson9-Apr-02 6:30 

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.