473,322 Members | 1,398 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,322 software developers and data experts.

w32_WNetGetUser not work Win98

this is my code :

I convert this code from VB6...
Problem : lResult =487

Private Declare Function w32_WNetGetUser Lib "mpr.dll" Alias "WNetGetUserA"
(ByVal lpszLocalName As String, ByVal lpszUserName As String, ByVal
lpcchBuffer As Integer) As Integer
Public Sub GetCurrentLogon16(ByVal UserName As String, ByVal DomainName As
String)
Dim lpUserName As String
Dim lpnLength As Integer
Dim lResult As Integer
Dim lpDomain As String

lpUserName = New String(Chr(0), 256)
lResult = w32_WNetGetUser("", lpUserName, 256)

If lResult = 0 Then
lpUserName = Left(lpUserName, InStr(1, lpUserName, Chr(0)) - 1)
UserName = lpUserName
DomainName = GetDomainFromRegistry()
End If

End Sub

How?
Nov 22 '05 #1
1 1592
Have you seen this?

http://tinyurl.com/bsvk

Nov 22 '05 #2

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

Similar topics

2
by: jon morgan | last post by:
Hi, I need to debug my app. under Windows 98. Although VS.net can't be installed it I have been able to install both Framework 1.1 and the SDK. Can I debug the app. in VS.net remotely from an...
6
by: Andrzej | last post by:
Used to read newsgroup for answers, now have to ask for them as well. I have an application (C#, .NET 1.1) that connects to local db on MSDE 2000 SP3a (using ADO from MDAC 2.71) on one side and...
0
by: Macadair | last post by:
I develop mid-range multi-user applications for a large site. Currently Win98 and Office97 are the standards used however we are slowly moving to WinXP. Due to the site upgrade cost, we are...
8
by: mheden | last post by:
Hello all, I'm using an Access 97 front-end with a SQL Server 2000 back-end. One particular bit of code runs a stored procedure to obtain a rowcount from one of the back-end tables. This works...
4
by: Wasi Rehman | last post by:
hi friends, I have one webservice which i want to run on win98 system because some reference in that webservice only run in win98, and my ASP.net application is on win2000 pro. I want to call that...
3
by: Giovanni pepe | last post by:
this is my code : I convert this code from VB6... Problem : lResult =487 Private Declare Function w32_WNetGetUser Lib "mpr.dll" Alias "WNetGetUserA" (ByVal lpszLocalName As String, ByVal...
0
by: Krunoslav Ostrouska | last post by:
ArrayList included in object is not saved at clippboard copy in Win98 (Clipboard.SetDataObject() and IDataObject.GetData()) ! In WinXP, framework calls GetObjectData() and...
0
by: sexy-trousers | last post by:
Is there a specific OS requirement for a win forms client written in VB.Net utilizing .net 1.1 that uses WSE2? Is the requirement to simply have .net 1.1. installed on the platform? i.e. the...
2
by: billsahiker | last post by:
I have read in this group that the .net 2 framework redistributable package can be installed on win98 and it includes a vb.net command line compiler. IF this is so, what sort of debugging, if any,...
0
by: Robert Dollinger | last post by:
Hi to everyone, I have a Service, that runs on a WinXP machine. The service read a file on a Win98 machine and write the content in a file on the WinXP machine. After tree times I get the error...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.