|
Hi,
got some header file to some dll - its C++ i need convert it to C#, and it is a problem for me.
How i should write it in c#:
#define FAPI_NUMBER_LENGTH 32<br />
#define FAPI_FILE_LENGTH 128<br />
#define FAPI_NOTE_LENGTH 1024
and this:
typedef struct {<br />
int m_ConditionFlag;<br />
int m_Line;<br />
int m_CallTypeFlag;<br />
time_t m_FromDateTime;<br />
time_t m_ToDateTime;<br />
char m_RemoteNumber[FAPI_NUMBER_LENGTH];<br />
char m_LocalNumber[FAPI_NUMBER_LENGTH];<br />
char m_Note[FAPI_NOTE_LENGTH];<br />
int m_UserData;<br />
int m_Limit;<br />
int m_Offset;<br />
int m_OrderBy1;<br />
int m_OrderBy2;<br />
} FAPI_Condition;
Greetings
|
|
|
|
|
The translation is almost the same. The define should work fine, and for the struct; Just remove the typedef and make your srtuct without it.
about time_t members of the struct, pass it as long.
Regards
|
|
|
|
|
You can use the long (or int) and convert it to DateTime:
int t= 1070390676; // value of time_t
System.DateTime dt= new System.DateTime(1970,1,1).AddSeconds(t);
|
|
|
|
|
Is this doable?
We're looking to develop an application that allows you to enter a domain (www.thewebsitename.com) and have the application return a list of all pages associated with that domain. (www.thewebsitename.com/allthesepages).
|
|
|
|
|
You can ask a question once. By posting the same question 3X, it might get ignored.
|
|
|
|
|
Is this doable?
We're looking to develop an application that allows you to enter a domain (www.thewebsitename.com) and have the application return a list of all pages associated with that domain. (www.thewebsitename.com/allthesepages).
Sanjeev
|
|
|
|
|
You can ask a question once. By posting the same question 3X, it might get ignored.
|
|
|
|
|
I POSTED IT IN THREE DIFF PLACES TO GET A WIDER RANGE OF SCHOLARS TO ANS MY QUE........IT WAS URGENT FOR ME AND NOT WRONG I THINK
|
|
|
|
|
The "SCHOLARS" you seek are smart enough to see one post. They don't need 3. All posts here are important to the person posting it. Most are urgent requests caused by some business request. This board is a community that gives answers to people who have attempted to program a specific task and are stuck.
|
|
|
|
|
sharma sanjeev wrote: I POSTED IT IN THREE DIFF PLACES
First, please don't shout. It is considered rude.
You posted this question three times in one forum in the space of a couple of minutes.
|
|
|
|
|
it was my mistake........apologies from my side ....
|
|
|
|
|
hello,
can i some how sleep a process in an application?:
my problem is i want to execute a sql string.
if it failed i want wait some (milli)seconds before i repeat the execution
thank you
|
|
|
|
|
Hi,
use a sleep(x); in your function
Regards
|
|
|
|
|
but where can i find it?!
|
|
|
|
|
Call
Thread.Sleep(1000); to sleep for one second. Yet, if you do this in your main Thread, this will cause your UI to freeze.
Regards
|
|
|
|
|
hi!
use
Thread.Sleep(5000); // this will sleep the thread for 5 seconds
abhinav
|
|
|
|
|
yes, thank you.
thats it.
|
|
|
|
|
how do you create a control array in C#?
|
|
|
|
|
Control[] MyArray = new Control[X];
Was that what you were looking for?
Regards
|
|
|
|
|
I'm quite new to c#. Can smbody pls tell me how to connect a mysql database to a c# project? Thanks
|
|
|
|
|
|
you need to install an ADO.NET driver for mysql, you can find one here:
http://dev.mysql.com/downloads/connector/net/5.0.html[^]
Once installed, new components, like MysqlDataset and MysqlDataTable, will appear in your toolbox in visual studio. Documentation on how to use them should also be included in the download, otherwise you can lookup the documentation for the ADO.NET components, like Dataset and DataTable, in the visual studio documentation, they are used the same way.
|
|
|
|
|
Hi,
are there any roules for a dll written in C#, which can be called by a VBA Macro?
Private Declare Function foo Lib "foo.dll" (sfoo as string) as string
How does the C# code for such dll look like?
Ariadne
|
|
|
|
|
Hi!
You'll have to create a COM object for this, VBA cannot access a function in a .NET assembly.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
What Mav said is true. But as an addition, you can write your code as C# and make your C# dll, then register it as COM dll then use it from your VBA macro.
I think this post[^] would be helpful.
Regards
|
|
|
|