|
well once again i am posting the question with bit more elaboration.I need to create MS project file using "MS Project Object Modal 11.0" within C# .All examples ,that I searched on internet, were written in VB.Net .I wonder if this could not be done in C# ... I am not getting any documentation on msdn either about Microsoft.Office.Interop.MSProject namespace .Is there any need to install MS Project 2003 SDK as well ???
Regards,
LinkinP
|
|
|
|
|
Hello, I need to use an unmanaged dll written in c in a program written in c#.
This dll uses linked list and I use PInvoke in my c# code.
Dll code:
typedef struct payload{
char name[NAME_SIZE];
int release;
char info[INFO_SIZE]; //this info is related to the type of msg: {app url, log url, command-line arguments}
payload *next;
}payload;
C# Code:
[StructLayout(LayoutKind.Sequential)]
public struct payload
{
public string name;
public int release;
public string info;
ref payload next; //Compiler error
}
I can't make it work because the compiler prompts me an error for the pointer in the struct, any suggestions?
|
|
|
|
|
what is the error, it might need a sizeof check out in the api
|
|
|
|
|
mephy83 wrote: [StructLayout(LayoutKind.Sequential)]
public struct payload
{
public string name;
public int release;
public string info;
ref payload next; //Compiler error
}
Use IntPtr for the pointer to the next structure:
[StructLayout(LayoutKind.Sequential)]
public struct payload
{
public string name;
public int release;
public string info;
public IntPtr next;
}
Check this reference[^] for more details. Specifically, look at the "MYPERSON2" example.
|
|
|
|
|
I want to use an enum of strings in my program, but as I found out, the default underlying type for enums is int
So how do you set the underlying type of an enum to string??
Thanks.
|
|
|
|
|
|
I guess I'll use string constants instead...
|
|
|
|
|
Depending on what your trying to solve it may be best. Enums were introduced to give meaning to magic numbers, it allows you to work with a meaningful name rather than some meaningless number.
|
|
|
|
|
The names of the enum values are strings, can't you use that?
public enum Animal { Dog, Cat, Mouse, Hippopotamus }<br />
Animal spot = Animal.Dog;<br />
string spotIs = spot.ToString();<br />
Console.WriteLine("Spot is: " + spotIs);
Output:
Spot is: Dog
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi!
I have a windows-app, that should perform normally when started with double-click.
If it is being started from an console/Dos-Box with more than 0 arguments it shall do a specific operation.
My problem is, that i cannot write console-output with Systen.Console.WriteLine("..."), because the application is set to be a windowsapplication. If i changed this to console-application i get an DOS-Box everytime i start the app with double-click (which looks stupid).
How can i make a windows application write it´s output to my DOS-Box or make the console-app not to open an DOS-box?
Help would be great!
Thanx a lot!
Greetings
J.
|
|
|
|
|
|
Hi,
Has anybody tried out creating an out of proc .NET component exposing
COM interface? We need to create component which would interact with Windows
powershell hence a .NET component and since it has to run on 64 bit system (Server)
but the client would be 32 bit thus a out of proc component which would
expose COM Interface.
Any pointers?
Thanks
Learning is a never ending process of Life.
|
|
|
|
|
Hi,
How to check if one type it is .Net type??
i have one list: Type[] list with many type. How can i know if one type it is .net type or one new type???
|
|
|
|
|
darkcalin wrote: Type[] list with many type. How can i know if one type it is .net type or one new type???
What do you mean by that? Surely they are all .NET types.
Do you mean, does the type belong to the .NET framework? If so, then I'm curious about why you would want to know that.
|
|
|
|
|
I want to find one solution for a big nonsolution ))
I want to know if it is System type
for example i have
Class class1
{
class2 bubu; // this is not a System type
int unu; //this is a simple type
int doi; //this is a simple type
}
|
|
|
|
|
darkcalin wrote: I want to know if it is System type
Then the full class name (the bit that includes the namespace) will start with System
|
|
|
|
|
is a god solution but i want to no make the string compare ...if is possible
|
|
|
|
|
How do I add and retrieve an image from MS Access
and then display it in a C# Form
Logically Onpoint
|
|
|
|
|
There are plenty tutorials on the subject. Try google, then if you get stuck, we can help you out. But... writing your code for you... No. You won't learn anything that way.
Hint: The classes you will need include OleDbConnection and OleDbCommand
|
|
|
|
|
hi,
in a client/server chat application the client can choose his fave font color and the server shld spread each client messages in its own unique font color. is there away to do that with the clients form displays messages in a richTextBox? (the only way i managed to do that is with listView)
many thanks
|
|
|
|
|
Hi!
You'd have to use the SelectionColor property for that. For example, something like this should work:
richTextBox1.Select(startOfMessage, 0);
richTextBox1.SelectionColor = Color.Red;
richTextBox1.SelectedText = "Message from User 1" + Environment.Newline;
richTextBox1.SelectionColor = Color.Blue;
richTextBox1.SelectedText = "Second message from User 2" + Environment.Newline;
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
|
How is it possible to maintain and share hashtables inside a webservice?
For example: a webservice adds data to hashtables. The hashtable data has to be shared between each application that calls the webservice.
p.s. I am trying to avoid creating files for each hashtable.
Thanks
|
|
|
|
|
i think by declaring ur hashtable as static will solve ur problem.
rahul
|
|
|
|
|
It does NOT because I am using static at present.
Thanks
|
|
|
|