Click here to Skip to main content
15,921,279 members
Home / Discussions / C#
   

C#

 
QuestionScrolling objects Pin
Sasuko16-Feb-06 2:15
Sasuko16-Feb-06 2:15 
AnswerRe: Scrolling objects Pin
malharone16-Feb-06 3:48
malharone16-Feb-06 3:48 
GeneralRe: Scrolling objects Pin
Sasuko16-Feb-06 4:45
Sasuko16-Feb-06 4:45 
QuestionIs there any way to detect and stop/pause somebody logging off? Pin
Anthony Mushrow16-Feb-06 2:14
professionalAnthony Mushrow16-Feb-06 2:14 
AnswerRe: Is there any way to detect and stop/pause somebody logging off? Pin
KaptinKrunch16-Feb-06 14:48
KaptinKrunch16-Feb-06 14:48 
Questionhow to use COM interop in C# Pin
Nataraj197816-Feb-06 0:16
Nataraj197816-Feb-06 0:16 
AnswerRe: how to use COM interop in C# Pin
Andy Moore16-Feb-06 3:36
Andy Moore16-Feb-06 3:36 
GeneralRe: how to use COM interop in C# Pin
Nataraj197816-Feb-06 18:11
Nataraj197816-Feb-06 18:11 
Thanks for replying to the query, but the problems do not get fixed... I am still facing problems with the following:

1. I cannot define array of structures as mentioned:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
internal struct TestStruct
{
public int var1;
public int var2;
public InnerStruct[3] var6;
}

when I compile the code, I get the error as:
Array size cannot be specified in a variable declaration (try initializing with a 'new' expression).

2. I cannot use the new operator inside structures, like this:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
internal struct TestStruct
{
public int var1;
public int var2;
public InnerStruct[] var6 = new InnerStruct[3];
}

when I compile this code, I get the error as:
'TestStruct': cannot have instance field initializers in structs.

3. As I had mentioned earlier, the VC++ 6.0 dll expects a byte pointer. To call the ProblemFunction() from a code in VC++ 6.0, I will be passing the information as:
TestStruct testVar;
int size = sizeof(testVar);

ProblemFunction(value1, value2, value3, (BYTE *)&testVar, &size);

Now that I have written the wrapper on same lines, the ProblemFunc needs proper values. That means that I need to somehow pass TestStruct object defined in C# as a byte pointer to the COM function ProblemFunc()

Can you please help me out with this....

Regards,
Nataraj.

GeneralRe: how to use COM interop in C# Pin
Andy Moore17-Feb-06 3:23
Andy Moore17-Feb-06 3:23 
Question[Message Deleted] Pin
Michiel_NL15-Feb-06 23:41
Michiel_NL15-Feb-06 23:41 
AnswerRe: C# Excel. Process doesn't kill. Pin
Curtis Schlak.16-Feb-06 3:17
Curtis Schlak.16-Feb-06 3:17 
QuestionChange IP Address Pin
am2h15-Feb-06 23:23
am2h15-Feb-06 23:23 
AnswerRe: Change IP Address Pin
J4amieC16-Feb-06 0:16
J4amieC16-Feb-06 0:16 
GeneralRe: Change IP Address Pin
am2h17-Feb-06 20:36
am2h17-Feb-06 20:36 
AnswerRe: Change IP Address Pin
leppie16-Feb-06 3:01
leppie16-Feb-06 3:01 
GeneralRe: Change IP Address Pin
am2h17-Feb-06 20:34
am2h17-Feb-06 20:34 
QuestionHow To inject Process in c# ? Pin
hdv21215-Feb-06 23:18
hdv21215-Feb-06 23:18 
AnswerRe: How To inject Process in c# ? Pin
leppie16-Feb-06 0:13
leppie16-Feb-06 0:13 
AnswerRe: How To inject Process in c# ? Pin
J. Dunlap16-Feb-06 0:20
J. Dunlap16-Feb-06 0:20 
QuestionGet full SOAP message Pin
Nandiator15-Feb-06 22:10
Nandiator15-Feb-06 22:10 
AnswerRe: Get full SOAP message Pin
J4amieC15-Feb-06 22:25
J4amieC15-Feb-06 22:25 
AnswerRe: Get full SOAP message Pin
Maqsood Ahmed15-Feb-06 22:26
Maqsood Ahmed15-Feb-06 22:26 
QuestionImages Pin
albCode15-Feb-06 21:39
albCode15-Feb-06 21:39 
GeneralRe: Images Pin
Guffa15-Feb-06 22:08
Guffa15-Feb-06 22:08 
GeneralRe: Images Pin
albCode15-Feb-06 22:26
albCode15-Feb-06 22:26 

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.