|
There is a VC++ dll, which has input parameter like this:
int Func(char * inputpara)
{
...
}
How to pass the parameter to it in VB.net?
The string seems has problem.
Thanks!
|
|
|
|
|
Hi
First when creating your dll, try using the "Create a dll that exports some items" template.
Then you see the sample exported function is declared as:
<br />
int WIN_API Func (...) <br />
{<br />
...<br />
}<br />
WIN_API (the name also contains your project name) is #defined in .h file.
It must be present so that the dll knows what functions to export.
also try adding the __stdcal to the function definition after WIN_API .
Then the functions are accessible from outside the dll.
Also should declare the functions in the .h file.
Then add a .def file that has the exported functions names.
Ask me to describe more if you had problems doing so.
|
|
|
|
|
I am not sure this may help but maybe you need to marshall your data before calling the API. So instead of passing a string, declare your variable as follows:
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=128)> Private inputpara() As Char
|
|
|
|
|
hi i need to save the file name with current system month and year... i also need to give the phy_path to store the file... when i try to run the applcation i get different file name for ex: if i given filename as "checkurl" and run it is saving as "c2eckurl" i dont wht wrong with it here is my code snippet
Dim str As String = "checkurl_"
Dim strfile As DateTime = DateTime.Now
strfilename = strfile.ToString(str + "MMM, yy")
can any body explain me.
regards
cyus
|
|
|
|
|
This is happening due to str + "MMM, yy" (i.e. "checkurl_MMM, yy") being used as a format string to the strfile.ToString() method. The "h" in "ch eckurl_" is being treated as a time formatting character.
Maybe your last line should read:
strfilename = str & strfile.ToString("MMM, yy")
Lookup the help on the DateTime.ToString() method for more details.
...Steve
|
|
|
|
|
thanx for the tip i want to display only month can u guide me
strMonth = strfile.ToString("m")
the above code snippet display month and date i need only month
regards
ybasha
|
|
|
|
|
Hello...
strMonth = strfile.ToString("MMM")
This will return the month in text form to the string strMonth
Tell me if you have any problem
_mubashir
|
|
|
|
|
i already got that thanx for the info....
Regard
ybasha
|
|
|
|
|
hi i need to save the file name with current system month and year... i also need to give the phy_path to store the file... when i try to run the applcation i get different file name for ex: if i given filename as "check" and run it is saving as "c2eck" i dont wht wrong with it here is my code snippet
Dim str As String = "checkurl_"
Dim strfile As DateTime = DateTime.Now
strfilename = strfile.ToString(str + "MMM, yy")
can any body explain me.
regards
cyus
|
|
|
|
|
Dim str as String
dim strfilename as string
str="checkurl_"
strfilename=str & format(now,"MM-YY")
Jojomonok
|
|
|
|
|
Hi,
Does anyone have a sample code or have an idea about how to Export a treeview control to Excel?
Thankyou. all help is appreciated.
Aartee.
...HE is watching Us All!
|
|
|
|
|
Hi all, I have a few COM DLLs in a project which have had MS Office UserForms imported into them. These are causing some problems and I have been advised to convert them all to native VB Forms instead. Only problem is this seems to be a 'search and destroy' exercise since you cannot copy and paste between an imported UserForm and a native VB Form - you need to rebuild them from scratch.
If I had only a couple of forms this would be easy, but since there are 27 and many of them are quite complex I am searching for a method to convert them insitu if possible or via a utility outside of the VB IDE (this is VB 6.0 not .NET (yet)).
Does anyone know of a method by which this can be achieved?
...Steve
|
|
|
|
|
I don't believe that's possible. I've never even heard of a tool to do it. I would also tend to believe that one doesn't exist since I believe this would be a rare case and never should get past the design stage of a project.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Dave, I totally agree. This system 'evolved' but without the 'natural selection' part Can't blame any of the developers since they have done an otherwise outstanding job - just a circumstance of the real corporate world in which I live.
The problem is that I can't build the COM DLLs with binary compatibility when they have UserForms as this always breaks them.
Just wanted to save myself a day or so reconstructing these forms.
Worth a shot anyway. Thanks for your post.
...Steve
|
|
|
|
|
Hi everyone,
Might be a silly question:
1) Does anyone know if I can use a SQL Server 2000 database instead of SQL Server 2000 CE database in a Windows CE application?
2) Any recommendation of books or website links that I can use to get an initial idea about the database programming of smart devices with VB.NET? I am really a new bird in this area.
Thanks a lot.
Frank
|
|
|
|
|
Hi, I'm trying to write a fairly program, but it requires me to take individual characters from a string. For example, say the string is
"I'm confused" the program needs to take say the fifth character "c" from "I'm confused". I haven't done much programming and what I did do was several years ago, so I don't remember or know how to accomplish this in basic... So, any help would appreciated.
you can email me at csel.poiuy@gmail.com
|
|
|
|
|
nm i figured out how... sorry to bother you guys lol
|
|
|
|
|
I'm looking for convertion source code (etc. word , powerpoint , pdf) to html by vb.net or asp.net
It's important! help me please
Thanks.
|
|
|
|
|
Pookky wrote:
by vb.net or asp.net
I'll also mention that ASP.NET is not a language, it's a platform.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I want to know how to save the updated values of the datagrid that has its values from 2 different tables.
i need it to be done by one button click,i am using vb.net form
|
|
|
|
|
You can iterate through the rows to work out which ones have changed, then insert those changes back into the tables. OBviously this involves one stored procedure that has at least two statements in it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Does anyone have any examples of communicating with a serial port in VB Express? I could sure use some help.
|
|
|
|
|
Do an article search on serial port .NET on The Code Project website and you'll see at least two articles that go into some depth. I don't believe there is any native support in Visual Studio for serial ports.
...Steve
|
|
|
|
|
There is in 2005 in the System.Io.Ports namespace.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hey - that's another excuse for me to start using it. Thanks Dave.
...Steve
|
|
|
|