473,386 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Help with Converting C#.Net to VB.Net

Could somebody please assist me in converting the following C#.Net code to
VB.Net code?

[DllImport("odbc32.dll")]
private static extern short SQLAllocHandle(short hType, IntPtr inputHandle,
out IntPtr outputHandle);
[DllImport("odbc32.dll")]
private static extern short SQLSetEnvAttr(IntPtr henv, int attribute, IntPtr
valuePtr, int strLength);
[DllImport("odbc32.dll")]
private static extern short SQLFreeHandle(short hType, IntPtr handle);
[DllImport("odbc32.dll",CharSet=CharSet.Ansi)]
private static extern short SQLBrowseConnect(IntPtr hconn, StringBuilder
inString, short inStringLength, StringBuilder outString, short
outStringLength,out short outLengthNeeded);

Thanks,
Rob Panosh
Nov 20 '05 #1
5 3836
Cor
Hi Rob,

When you look at this yesterday revised page, I think that you can do it
yourself

http://www.harding.edu/USER/fmccown/...omparison.html

Cor
Could somebody please assist me in converting the following C#.Net code to
VB.Net code?

[DllImport("odbc32.dll")]
private static extern short SQLAllocHandle(short hType, IntPtr inputHandle, out IntPtr outputHandle);
[DllImport("odbc32.dll")]
private static extern short SQLSetEnvAttr(IntPtr henv, int attribute, IntPtr valuePtr, int strLength);
[DllImport("odbc32.dll")]
private static extern short SQLFreeHandle(short hType, IntPtr handle);
[DllImport("odbc32.dll",CharSet=CharSet.Ansi)]
private static extern short SQLBrowseConnect(IntPtr hconn, StringBuilder
inString, short inStringLength, StringBuilder outString, short
outStringLength,out short outLengthNeeded);

Nov 20 '05 #2
Cor,

Thanks I will take a look.

Rob

"Cor" <no*@non.com> wrote in message
news:ev**************@TK2MSFTNGP09.phx.gbl...
Hi Rob,

When you look at this yesterday revised page, I think that you can do it
yourself

http://www.harding.edu/USER/fmccown/...omparison.html

Cor
Could somebody please assist me in converting the following C#.Net code to VB.Net code?

[DllImport("odbc32.dll")]
private static extern short SQLAllocHandle(short hType, IntPtr

inputHandle,
out IntPtr outputHandle);
[DllImport("odbc32.dll")]
private static extern short SQLSetEnvAttr(IntPtr henv, int attribute,

IntPtr
valuePtr, int strLength);
[DllImport("odbc32.dll")]
private static extern short SQLFreeHandle(short hType, IntPtr handle);
[DllImport("odbc32.dll",CharSet=CharSet.Ansi)]
private static extern short SQLBrowseConnect(IntPtr hconn, StringBuilder
inString, short inStringLength, StringBuilder outString, short
outStringLength,out short outLengthNeeded);


Nov 20 '05 #3
Cor,

Can't find the VB equiv for C# ... IntPtr inputHandle

Any Ideas?

Rob
"Cor" <no*@non.com> wrote in message
news:ev**************@TK2MSFTNGP09.phx.gbl...
Hi Rob,

When you look at this yesterday revised page, I think that you can do it
yourself

http://www.harding.edu/USER/fmccown/...omparison.html

Cor
Could somebody please assist me in converting the following C#.Net code to VB.Net code?

[DllImport("odbc32.dll")]
private static extern short SQLAllocHandle(short hType, IntPtr

inputHandle,
out IntPtr outputHandle);
[DllImport("odbc32.dll")]
private static extern short SQLSetEnvAttr(IntPtr henv, int attribute,

IntPtr
valuePtr, int strLength);
[DllImport("odbc32.dll")]
private static extern short SQLFreeHandle(short hType, IntPtr handle);
[DllImport("odbc32.dll",CharSet=CharSet.Ansi)]
private static extern short SQLBrowseConnect(IntPtr hconn, StringBuilder
inString, short inStringLength, StringBuilder outString, short
outStringLength,out short outLengthNeeded);


Nov 20 '05 #4
Rob,
IntPtr is System.IntPtr, you use it the same way in VB.NET that you do in
C#.

http://msdn.microsoft.com/library/de...ClassTopic.asp

It is the correct type to use here.

Hope this helps
Jay

"Rob Panosh" <ro************************@asdsoftadfdware.com> wrote in
message news:%2****************@TK2MSFTNGP12.phx.gbl...
Cor,

Can't find the VB equiv for C# ... IntPtr inputHandle

Any Ideas?

Rob
"Cor" <no*@non.com> wrote in message
news:ev**************@TK2MSFTNGP09.phx.gbl...
Hi Rob,

When you look at this yesterday revised page, I think that you can do it
yourself

http://www.harding.edu/USER/fmccown/...omparison.html

Cor
Could somebody please assist me in converting the following C#.Net code
to
VB.Net code?

[DllImport("odbc32.dll")]
private static extern short SQLAllocHandle(short hType, IntPtr

inputHandle,
out IntPtr outputHandle);
[DllImport("odbc32.dll")]
private static extern short SQLSetEnvAttr(IntPtr henv, int attribute,

IntPtr
valuePtr, int strLength);
[DllImport("odbc32.dll")]
private static extern short SQLFreeHandle(short hType, IntPtr handle);
[DllImport("odbc32.dll",CharSet=CharSet.Ansi)]
private static extern short SQLBrowseConnect(IntPtr hconn,

StringBuilder inString, short inStringLength, StringBuilder outString, short
outStringLength,out short outLengthNeeded);



Nov 20 '05 #5
Cor
Hi Rob,

And with this?

http://msdn.microsoft.com/library/de...sctortopic.asp

Cor

Can't find the VB equiv for C# ... IntPtr inputHandle

Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Rex_chaos | last post by:
Hi all, I have a question about datatype converting. Consider the following types std::complex<double> and struct MyComplex { double re, im; }
4
by: jipster | last post by:
hi, i need help converting this java program to C++...are there any programs or nething that could be used to do this faster?? class hw2 { static public void main (String args) { hw2.test();}...
3
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With...
3
by: alyssa | last post by:
Hi guys, May i know how to declare a string of binary data and pass it to the method? For example, int a={10010001120420052314} is it correct? and if i have receive the binary data, may i know...
4
by: Clark Stevens | last post by:
I have a program that I'm converting from VB6 to VB.NET. It reads in a text file containing barcode numbers and their corresponding descriptions. Then the user enters the barcode number and the...
32
by: robert d via AccessMonster.com | last post by:
I'm looking at converting DAO to ADO in my app. All of my DAO connections are of the following structure: Dim wsName As DAO.Workspace Dim dbName As DAO.Database Dim rsName As DAO.Recordset ...
13
by: Paraic Gallagher | last post by:
Hi, This is my first post to the list, I hope somebody can help me with this problem. Apologies if it has been posted before but I have been internet searching to no avail. What I am trying...
16
by: manmit.walia | last post by:
Hello All, I have tried multiple online tools to convert an VB6 (bas) file to VB.NET file and no luck. I was hoping that someone could help me covert this. I am new to the .NET world and still...
2
anukagni
by: anukagni | last post by:
Hi, iam having an database for that i have created an user manual includes help topics ..I prepared in the word format and i want to covert this to html help . Iam having Ms Html workshop but i...
10
by: minterman | last post by:
1. the program needs to convert btu to jules 2. Convert calories to joules 3. Convert joules to joules 4 exit the program. if the user type anything other than 1-4 the program should print a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.