|
Exception is coming somewhere in your code
if you can provide us the coding and highlight on which line the exception is coming then it would be much easier. other wise only those can reply who had suffered the same problem and then solved it.
Rizwan Bashir
|
|
|
|
|
Hi,
Thanks for the quick response. I had been calling
ChannelServices.RegisterChannel(channel, False) , changing it to ChannelServices.RegisterChannel(channel, True) sorted it out.
dlarkin77
|
|
|
|
|
Folks,
I am trying to figure out why the following code is not functioning properly. It seems to be failing on the second call to the API call with an 'Object reference not set to an instance of an object.' I think that it does not like one of the input parameter types.
Private Declare Function LookupAccountSid Lib "advapi32.dll" Alias "LookupAccountSidA" ( _
<marshalas(unmanagedtype.lptstr)> ByVal lpSystemName As String, _
ByVal lpSid As IntPtr, _
<marshalas(unmanagedtype.lptstr)> ByVal lpName As StringBuilder, _
ByRef cchName As Integer, _
ByVal lpReferencedDomainName As StringBuilder, _
ByRef cchReferencedDomainName As Integer, _
ByVal peUse As Integer _
) As Boolean
Private Declare Auto Function ConvertSidToStringSid Lib "advapi32.dll" ( _
ByVal pSid() As Byte, _
ByRef ptrSid As IntPtr _
) As Boolean
Private Declare Auto Function ConvertStringSidToSid Lib "advapi32.dll" ( _
<marshalas(unmanagedtype.lptstr)> ByVal StringSid As String, _
ByRef Sid As IntPtr _
) As Boolean
Dim sid As String = "S-1-5-xxxxxx"
Dim pSid As IntPtr = Nothing
Dim accountNameLength As Integer = 0
Dim domainNameLength As Integer = 0
Dim sidUse As Integer = 0
Dim domainName As StringBuilder
Dim accountName As StringBuilder
Dim apiError As Integer = 0
Dim isConverted As Boolean
Dim succeeded As Boolean
Dim returnString As String
Try
isConverted = ConvertStringSidToSid(sid, pSid)
If Not isConverted Then
apiError = Marshal.GetLastWin32Error
Marshal.FreeHGlobal(pSid)
Throw New Exception(New Win32Exception(apiError).Message)
End If
succeeded = LookupAccountSid( _
Nothing, _
pSid, _
accountName, _
accountNameLength, _
domainName, _
domainNameLength, _
sidUse _
)
domainName = New StringBuilder(domainNameLength)
accountName = New StringBuilder(accountNameLength)
succeeded = LookupAccountSid( _
Nothing, _
pSid, _
accountName, _
accountNameLength, _
domainName, _
domainNameLength, _
sidUse _
)
If succeeded Then
Marshal.FreeHGlobal(pSid)
returnString = domainName.ToString & "\" & accountName.ToString
Else
apiError = Marshal.GetLastWin32Error
Marshal.FreeHGlobal(pSid)
Throw New Exception(New Win32Exception(apiError).Message)
End If
Catch ex As Exception
Throw New Exception(ex.Message)
Finally
End Try
|
|
|
|
|
Hello!
I am pretending to write a spyware application with vb.net. However, I don't know how to get the patterns (intelli signatures) of viruses.
Is there a web site who allows visitors to download such pattern files. Would you please let me know if you know a well-known one.
Thanks!
Bedri
|
|
|
|
|
I want to add sizing handles to my image processing aplication, same as they provide on Designer to move and resize objects(control). Please help.
safalmittal@gmail.com
|
|
|
|
|
some calculation is required. like
1. when on image contorl the mouse is on border then change the cursor type to resize.
2. then on mouse down if mousepointer is resize then say one boolean is set to true.
3. then on mouse move the boolean is true then resize the imagebox with current co-ordinates.
hope you will understand.
by the way in image applications user click zoomin and zoomout stuff which you can do by increasing the width and height of the control
Rizwan Bashir
|
|
|
|
|
I have a vb application that generates tha following error:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
How can I resolve this error?
|
|
|
|
|
|
While I am updating datasource using update method of dataadapter, showing the following message
"Dynamic SQL generation is not supported against a SelectCommand that does not return any base table information"
Can anybody hep me.
|
|
|
|
|
May be the table is empty.
AMCV
|
|
|
|
|
hi
i want to get the IP address from a System name in VB.I used gethostbyname but it is valid only for URL's.(eg:www.google.com)
But i want IP address for the system which exists in a domain.(eg: "remotehostname")
how to obtain it??
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
-- modified at 7:00 Wednesday 17th May, 2006
|
|
|
|
|
|
1. I want to assign datasouce to chart,but i don't know
how to assign it.
2. After it was assigned, How can i add each field(retrived from database) to bar of chart.
I used chart:Microsoft office web component 11.0
for example: I have three fields in table of database
Province: Male : Female :
BDB 5 3
BMC 4 7
|
|
|
|
|
table1
ID Name
001 da
002 ab
combo.datasource=table1
combo.displaymember="Name"
combo.valuemember="ID"
I want to get '001' or '002' from combobox.
|
|
|
|
|
How does one load info to an ftp site via vb.net
|
|
|
|
|
|
hi, im populating a dataset from a view and displaying it on datagrid, now i need to edit some of the records which are displayed on datagrid,does data grid allow such edit , and how can i do it ?
|
|
|
|
|
Hi,
Yes you can edit records in the datagrid.
Go through this link it will be helpful
http://samples.gotdotnet.com/quickstart/aspplus/samples/webforms/ctrlref/webctrl/datagrid/doc_datagrid.aspx
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi All,
My problem is I have to Import non - unicode charachters from an excel and show it in DataGrid.In excel they seem to be fine,but whenever i see it in datagrid it is shown like meaningless characters like [][][] .So in UI the non - unicode characters are not shown properly.
I am using oledbconnection for this and the code works fine for Unicode characters.
Anybody have any idea about this problem .
Nilanjana
|
|
|
|
|
how do I put Flash file (*.swf) on Form?
|
|
|
|
|
|
Hello everybody. I already add to vb8. but I cannot draw it on the Form. can you tell me?
|
|
|
|
|
What are you asking ? A control that's created in VB6 is unlikely to work in VB8, unless it works via COM.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have an applicatoin with an embeded webbrowser window in it. I need to get the screen XY coordinates of the element so I can click on the element. I am able to identitify the element by "ID" in the HTML. Below is the type of thing I'm trying to get the coodinates for.
Example:
<HTML><br />
<BODY><br />
<table><br />
<tr><br />
<td id="findthis">I want to find the XY to be able to click here with VB.net</td><br />
</tr><br />
</table><br />
</BODY><br />
</HTML>
|
|
|
|
|
Hi....
I have encounter this problem when i am reading info from my excel file using VB6, the characters it's display is in ? format. How Can i solve this problem
Help urgently required
Thanks a Million
KaKaShi HaTaKe
|
|
|
|