Home > error 487 > error 487 wnetaddconnection2

Error 487 Wnetaddconnection2

Contents

for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand wnetaddconnection2 error codes Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services

Wnetaddconnection2 C#

Groups Website Testing Store Headlines Experts Exchange > Questions > getting 487 error using WNetAddConnection2 Want to Advertise Here? Solved getting 487 error using WNetAddConnection2 Posted on 2005-08-05 Visual Basic Classic 1 Verified Solution 10 Comments 3,322 Views Last Modified: 2012-06-22 I'm trying to use WNetAddConnection2 with the code below. I keep getting a 487 error upon making the api call. Can anyone tell me if there's a problem in the code or what the 487 error is indicating? It's being called as such: MapDrive("Z:", "\\ipaddress\sharename", "domain\user", "password") Module FileSystemFunctions Public Const RESOURCETYPE_DISK = &H1 Public Const RESOURCE_GLOBALNET = &H2 Public Const RESOURCEDISPLAYTYPE_SHARE = &H3 Public Const RESOURCEUSAGE_CONNECTABLE = &H1 Public Const ERROR_ACCESS_DENIED = 5& Public Const ERROR_ALREADY_ASSIGNED = 85& Public Const ERROR_BAD_DEV_TYPE = 66& Public Const ERROR_BAD_DEVICE = 1200& Public Const ERROR_BAD_NET_NAME = 67& Public Const ERROR_BAD_PROFILE = 1206& Public Const ERROR_BAD_PROVIDER = 1204& Public Const ERROR_BUSY = 170& Public Const ERROR_CANCELLED = 1223& Public Const ERROR_CANNOT_OPEN_PROFILE = 1205& Public Const ERROR_DEVICE_ALREADY_REMEMBERED = 1202& Public Const ERROR_EXTENDED_ERROR = 1208& Public Const ERROR_INVALID_PASSWORD = 86& Public Const ERROR_NO_NET_OR_BAD_PATH = 1203& Private Structure NETRESOURCE Dim dwScope As Long Dim dwType As Long Dim dwDisplayType As Long Dim dwUsage As Long Dim lpLocalName As String Dim lpRemoteName As String Dim lpComment As String Dim lpProvider As String End Structure Private Declare Function WNetAddConnection2 Lib "mpr.dll" Alias "WNetAddConnection2A" (ByVal lpNetResource As NETRESOURCE, ByVal lpPassword As String, ByVal lpUserName As String, ByVal dwFlags As Long) As Long Private Declare Function WNetCancelConnection2 Lib "mpr.dll" Alias "WNetCancelConnection2A" (ByVal lpName As String, ByVal dwFlags As Long, ByVal fForce As Long) As Long

this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 2 of 2 Thread: Map drive with https://www.experts-exchange.com/questions/21517505/getting-487-error-using-WNetAddConnection2.html wnetaddconnection2 Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Jan 17th, 2006,10:11 PM #1 SoulMate View Profile View Forum Posts Thread Starter New Member Join Date Feb 2005 Posts 3 Map drive with wnetaddconnection2 Hi http://www.vbforums.com/showthread.php?382076-Map-drive-with-wnetaddconnection2 guys, I got this error 487 when i use wnetaddconnection2.. Anyone got any solution ? -------------------------------------------------------------------- Structure NETRESOURCE Dim dwScope As Long Dim dwType As Long Dim dwDisplayType As Long Dim dwUsage As Long Dim lpLocalName As String Dim lpRemoteName As String Dim lpComment As String Dim lpProvider As String End Structure Const RESOURCETYPE_DISK = &H1 Declare Function WNetAddConnection2 Lib "mpr.dll" Alias "WNetAddConnection2A" (ByRef lpNetResource As NETRESOURCE, ByVal lpPassword As String, ByVal lpUserName As String, ByVal dwFlags As Long) As Integer Declare Function WNetCancelConnection2 Lib "mpr.dll" Alias "WNetCancelConnection2A" (ByVal lpName As String, ByVal dwFlags As Long, ByVal fForce As Long) As Long Dim conn Dim theNetResource As NETRESOURCE theNetResource.lpRemoteName = "\\ipaddress\c$" theNetResource.lpLocalName = "G:" theNetResource.dwType = RESOURCETYPE_DISK conn = WNetAddConnection2(theNetResource, "password", "username", 0) MsgBox(conn) --------------------------------------------------------------------- conn returns 487!! Reply With Quote Jan 17th, 2006,10:41 PM #2 jmcilhinney View Profile V

från GoogleLogga inDolda fältSök efter grupper eller meddelanden

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Invalid handle while trying to connect to networkshare up vote 5 down vote favorite I have a program which needs to put data on a network share. In some cases, the user has no access through his account, and would need to provide credentials to login. My idea was to have the program popup the windows credential screen so the user can login (like when the user would open the share through windows explorer). I found the WNetUseConnection API which would allow to login to the share without mapping it, and it has options to give a prompt. This is the code I'm using: Public Class frmMain Private Const CONNECT_INTRERACTIVE = &H8 Private Const CONNECT_PROMPT = &H10 Private Const RESOURCETYPE_DISK = &H1 Private Structure NETRESOURCE Public dwScope As Long Public dwType As Long Public dwDisplayType As Long Public dwUsage As Long Public lpLocalName As String Public lpRemoteName As String Public lpComment As String Public lpProvider As String End Structure Private Declare Function WNetUseConnection Lib "mpr.dll" _ Alias "WNetUseConnectionA" ( _ ByVal hwndOwner As Long, _ ByRef lpNetResource As NETRESOURCE, _ ByVal lpUsername As String, _ ByVal lpPassword As String, _ ByVal dwFlags As Long, _ ByVal lpAccessName As String, _ ByRef lpBufferSize As Long, _ ByRef l

 

Related content

487 error

Error table id toc tbody tr td div id toctitle Contents div ul li a href Windows Error a li li a href Sip Request Terminated a li ul td tr tbody table p SIP is based around request response transactions in a similar manner to the Hypertext Transfer Protocol HTTP Each transaction consists of a SIP request relatedl which will be one of several request methods and at error code sip least one response p SIP requests and responses may be generated by any SIP win error user agent user agents are divided into clients UACs which initiate requests

error 487 windows

Error Windows table id toc tbody tr td div id toctitle Contents div ul li a href Win Error a li li a href Dbghelp Error a li li a href Windows Error Codes List a li ul td tr tbody table p Studio products Visual Studio Team Services Visual Studio Code Visual Studio Dev Essentials Office Office Word Excel PowerPoint Microsoft Graph Outlook relatedl OneDrive Sharepoint Skype Services Store Cortana Bing Application Insights Languages sip error platforms Xamarin ASP NET C TypeScript NET - VB C F Server Windows voxox error Server SQL Server BizTalk Server SharePoint Dynamics Programs

error 487

Error table id toc tbody tr td div id toctitle Contents div ul li a href Dbg Help Error a li li a href Symgetsymfromaddr Failed With a li li a href Error Code Sip a li li a href Symfromaddr Returned Error a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might relatedl have Meta Discuss the workings and policies of this p h id Dbg Help Error p site About Us Learn more about Stack Overflow the company Business Learn more dbghelp about

error 487 in call mapviewoffileex

Error In Call Mapviewoffileex table id toc tbody tr td div id toctitle Contents div ul li a href Openprocess a li ul td tr tbody table p Things Small and Medium Business Service Providers All Solutions Services relatedl Advise Transform and Manage Financing and Flexible error invalid address Capacity IT Support Services Education and Training Services writeprocessmemory All Services Products Integrated Systems Composable Systems Converged Systems Hyper Converged Systems Blade createremotethread Systems Infrastructure Management Software Application Lifecycle Management Application Delivery Management Big Data Analytics DevOps Enterprise Security Hybrid and Private Cloud Information p h id Openprocess p Governance Information