|
Hello,
I have to call one function in C++ DLL from c#.Net project.How can i do that?
Amruta
|
|
|
|
|
[DllImport("yourLib.dll")]
private static extern void yourFunction();
_________________________________
Please inform me about my English mistakes, I still try to learn your language!
|
|
|
|
|
I tried using that DllImport but the problem is in difference of data types while calling the function in c++ from C#.
Amruta
|
|
|
|
|
hi i m new on c#.net i have to develop a Form for Data Input and i need to use a DataGrid on it (with ComboBox and DTP on it), can anyone send me the example of such scenario.
i'll b very much thankful for this act.
A H Khan
dcet99@hotmail.com
|
|
|
|
|
for getting data out of the database use Connection/DataAdapter/Datasets classes (odbc, oledb or SQl)
binding data to the datagrid use datasource (this also works for Arrays and ArrayLists)
To insert combos or any other gui-objects into the datagrid search on Templatecolumns, there are some tutorials here on CP.
I didn't play in winforms with datagrids much, but in ASP.NET I usually called a function which created my datagrid programmatically.
good luck.
No hurries, no worries.
|
|
|
|
|
Is it possible to create programmatically ne database file (SomeDatabase.mdb)?
|
|
|
|
|
I want to write DCOM components,but I don't know how to write the DCOM components in C#.
P:-Dlease tell me about it!
if possibility,please give me some examples about it!
Thank you!
|
|
|
|
|
First hit[^] on a google search.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Another idiot who doesn't like it when you tell them "Google is your friend!". I hate it when people come here and expect you to hand feed them every detail they want to know! Whatever happened to programmers doing their own research?! How on earth do these people learn anything?!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
Whatever happened to programmers doing their own research?! How on earth do these people learn anything?!
Yeah, it's a worry. I used to just say 'google', now I actually give the link as well as telling them how I got it. Still, people are not happy.
But at the end of the day, it's all good news for you and me. None of the 'I can't do my own research' brigade are ever going to put us out of a job.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
None of the 'I can't do my own research' brigade are ever going to put us out of a job.
Soooo true! There is a bright side!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I don't know how many smack i got from Mr.Kreskowiak for this sort of spoon feeding which reflect in my answer submissions. .
Sreejith Nair
[ My Articles ]
|
|
|
|
|
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
Here is the code I am using to get the total of the following textboxes
int OnHandVar1=Convert.ToInt32(OnHandRow1.Text);
int OnHandVar2=Convert.ToInt32(OnHandRow2.Text);
int OnHandVar3=Convert.ToInt32(OnHandRow3.Text);
int OnHandVar4=Convert.ToInt32(OnHandRow4.Text);
int OnHandVar5=Convert.ToInt32(OnHandRow5.Text);
int OnHandresult= OnHandVar1 + OnHandVar2 + OnHandVar3 + OnHandVar4 + OnHandVar5;
TxtOnHand.Text =Convert.ToString(OnHandresult);
actully for the other things the code is working just fine and also before it was working fine, now it is giving me an error saying that
"INPUT STRING WAS NOT IN A CORRECT FORMAT"
CAN SOMEONE PLEASE HELP ME OUT URGENT!!!!!!!!!!
Thanks,
I really appreciate your response.
Urgent
|
|
|
|
|
Zindagi11@rediffmail.com wrote:
"INPUT STRING WAS NOT IN A CORRECT FORMAT"
Gee. What do you think this might mean ? I'd guess that the input string was not in the correct format. I'd further guess that seeing as you're converting strings to numbers, that some of them were not valid numbers ( empty strings perhaps ? ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'm not sure, but doesn't .NET create 0 for empty strings? Could be wrong though.
No hurries, no worries.
|
|
|
|
|
Like Christian said, the Text might be empty, or it's not a number.
<italic>Work hard, Work effectively.
|
|
|
|
|
To add on to Christian reply, your string might contain alphabets or non-digit characters. Perhaps you can run a Char.IsDigit(..) check on each characters in the string.
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
How do I handle empty strings in this particular code, I will really appreciate it.
Thanks,
ZIndagi
ZIndagi
|
|
|
|
|
This handles an empty value:
int OnHandVar1;<br />
if (OnHandRow1.Text.Length == 0) {<br />
OnHandVar1 = 0;<br />
} else {<br />
OnHandVar1 = int.Parse(OnHandRow1.Text);<br />
}
If the value is not empty and not numeric, it still gives an error, though.
---
b { font-weight: normal; }
|
|
|
|
|
is there a simple way to change background color of the row, based on its value...(based on cell value in same row)
|
|
|
|
|
"Simple" is a relative term, dependant on your definition and programming skill level, compared to someone else.
You might want to take a look at this[^] article by Piero.Viano.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi there friends,
I am working on a program that its language is not english(so mine!).
every time user wants to change the language he must press ALT+SHIFT
and this is annoying.How can I change language programatically?
Thank You!
|
|
|
|
|
i have a problem where, i need to display shared folders of a specified computer in a explorer. If i give a computer name, it should display the shared folders in a explorer. I could do that through wmi queries, but it is in not explorer view. The problem has to be solved in C#.
can anybody guide me?
Amar
|
|
|
|
|
I have binary files that have delimiters inserted to indicate document breaks. I need to break apart these files into these documents in C# and save each to a binary file. How would one go about this?
|
|
|
|