|
ok..but how do i develop the connection string at runtime...sql server
Nab
|
|
|
|
|
|
Cannot marshal field 'table' of type 'MIB_TCPTABLE': Invalid managed/unmanaged type combination (Arrays fields must be paired with ByValArray or SafeArray).
i got this error when trying to call function GetTcpTable.. see the following code..
[module declaration]
Structure MIB_TCPROW
Dim dwState As Long
Dim dwLocalAddr As Long
Dim dwLocalPort As Long
Dim dwRemoteAddr As Long
Dim dwRemotePort As Long
End Structure
<structlayout(layoutkind.sequential, charset:="CharSet.Ansi)"> Structure MIB_TCPTABLE
<marshalas(unmanagedtype.byvaltstr, sizeconst:="100)"> Dim table() As MIB_TCPROW
Dim dwNumEntries As Long
End Structure
Public v_MIB_TCPTABLE As MIB_TCPTABLE
Declare Function GetTcpTable Lib "IPhlpAPI.dll" (ByVal pTcpTable As MIB_TCPTABLE, ByVal pdwSize As Long, ByVal bOrder As Long) As Long
[form code]
Dim tcpt As MIB_TCPTABLE
Dim l As Long
Dim x As Integer
Dim i As Integer
Dim RemA As String
Dim LocP As String
Dim RemP As String
Dim state As Integer
l = Len(v_MIB_TCPTABLE)
GetTcpTable(tcpt, l, 0)
x = tcpt.dwNumEntries
after calling GetTcpTable function i got exeption as mention above
please help
|
|
|
|
|
It looks like you've found and are using an old VB6 definition of the structures, not compatibile with VB.NET. A 32-bit integer is called Integer in VB.NET, not Long. That was the old VB6 name for it. Long under VB.NET is a 64-bit integer. If you don't get this correct, you can imbalence the call stack.
The function declaration should be this:
Declare Function Auto GetTcpTable Lib "IPhlpAPI.dll" ( _
ByVal pTcpTable As MIB_TCPTABLE, _
ByVal pdwSize As Integer, _
ByVal bOrder As Boolean) As Integer
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi all,
First of all - Wishing you all a Happy & Prosperous New Year 2007...
My Prob:-
I hv developed a web application. I wanna use it in my Local Intranet with my machine as a Server. This web page can b seen on my machine, if I type my Computer name in my Internet Explorer, but due to some reasons i m not able to see this page on any other machine. Its says "Page cannot be found"
My machine is accessible to all this system if you try it thru windows explorer, but still the web page cannot b seen.I think there is some prb with the IIS settings bcoz even i changed the default web page & kept IIS web page as a default web page,it is still not accesible.
I m not able to trace out wht exactly the prb is. Pls help me to get the soln.
Thanx in advance.
|
|
|
|
|
Can the other machines resolve your machine names address? open up a CMD prompt on those machines and type PING machineName . If it comes back with a response, then it can resolve your machine name and there's something else wrong. It's possible that you're not using the correct path after the name.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hii Dave,
I tried to ping my machine frm 2-3 diffrent machines & I was successful. So i dont think there is any prb in connectivity, but still the page is not displayed.
Regarding path: As the system is in LAN, I type http://mymachinename on the other machines. Even i hv entered my machine name in the Bypass proxy server for foll.address textbox on the other machines, still its not working.....wht can b the prb???
|
|
|
|
|
You're possibly not typing the correct path into the address box. It should be a folder under the Inetpub\wwwroot folder on your machine.
http://yourmachine/applicationfolder
or possibly
http://yourmachine/applicationfolder/pagename.aspx
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I hv tried these things but still its not working. Now i m getting confused abt this prb.
Can u tell me what r the settings required to be done in IIS ?
|
|
|
|
|
You say it works from your own machine but not from remote machines. I have no idea what the problem could be now. IIS is running, the site is running, the path is correct, the name of the machine is resolvable. It should be working. I'd go back and reverify everything. After that, I have no idea what the problem is.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Ok. I will hv to search some more factors affecting it.Even after removing VB.Net program from the picture, IIS is not able to display its default web page on the network. So i think prb lies in either of two things:- IIS settings or network settings.
Thanks for the help.
|
|
|
|
|
Dear friends,
Can I use any alternate for DSO Framer control to display document, excel, ppt, pdf etc files. I tried aspose too, but it was
not meeting our requirements. Because they want a tool which takes the documents as it is like DSO Framer. In aspose to
change the document format we need to change the code also.
And I need to email this document too. So that document may be changed so frequently. And dont forget that document must have
to be made using .Net frame work library(com component is not preferable). What shoud I use in this case. Please help me.
Thank you.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Stop cross posting in all the forums! This will NOT get you an "immediate reply", as you call it. It's likely to get you ignored.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: Stop cross posting in all the forums!
I've mentioned that to the OP and he cross posts even more
|
|
|
|
|
Must be something in their Cheerios...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: Must be something in their Cheerios...
|
|
|
|
|
Sir/Madam,
I want to know the property of the combo box that restrict the user from typing into the combo box and also allows the user to select the items into the combo box.
Thanks and Regards
Pankaj Garg
|
|
|
|
|
|
If you want to stop them typing anything, set the DropDownStyle to simple or DropDownList.
Posted by The ANZAC
|
|
|
|
|
Once upon a time I had fixed VB6 to scroll the code window using the scroll wheel on the mouse. Them my system crashed, and now I can'y find the details on how to set this up again.
Anyone got any ideas??
Thanks
David Loring
!! Keep Music Live !!
|
|
|
|
|
|
Thanks for that. Actually I use Visual Studio 2005, but I have several legacy programs that need to be maintained and occasionally just for some things VB6 is easier.
David Loring
!! Keep Music Live !!
|
|
|
|
|
Hi,
Ive come across a strange problem in VB 2005 express edition. I have a program that uses movie player pro activeX and on that I have a button called load, that loads a video. The program work on my desktop computer, however when i shifted it onto my laptop it doesnt seem to load the file i want it to.
I have made sure the coding is all correct (i.e. the path name of where the file is, has been altered on the laptop).
But for some reason the load button simply does not load the movie onto the movie player pro activeX.
Does anyone know why this is? and suggest on anything I could do to load the video. I can assure the code is all correct and the video i want to playe and movie pro activeX are installed on the laptop.
Thanks in advance.
Jaidev
|
|
|
|
|
jady84 wrote: I can assure the code is all correct
Considering there is a problem, wouldn't this be a false statement?
Without seeing the code you're using to pick and load the video, there's not much anyone can tell you.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am working on this program where i need to supply the name of the server at runtime so as to dynamically build the connection string..
what I am saying is that..the program will have a initial setup screen, so the user can supply the name of the server...
how do i go about doing that..presently i am using local and at times i use the name of my server..but i need to use the program on different computer on a network, which i am not sure of the server name at this moment...can anyone help.. I hope this was clear..
i am using sql server 2000 and vb.net 2003 as my front end...
Nab
|
|
|
|