[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

WNetAddConnection

Posted on 1999-12-16
3
Medium Priority
?
409 Views
Last Modified: 2010-04-06
I am using the WNetAddConnection function
but I want to make the drive letter a variable instead
making it a constant string.

this I have currently and it works.
      WNetAddConnection('\\rsg_server\apps1','','k:');

I want to make the "k:" a variable because the drive
letters will change.

I tried using a variable but I have an error invalid
type string and pchar..or something like that.

Any ideas on how to make this work?
0
Comment
Question by:waipahu
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
edey earned 200 total points
ID: 2288137
you could try

var
  drive : pchar;
begin
   drive := 'k:';
   WNetAddConnection('\\rsg_server\apps1','','k:');
end;

GL
Mike
0
 

Author Comment

by:waipahu
ID: 2288235
Thank you very much!!!
0
 
LVL 6

Expert Comment

by:edey
ID: 2288758
Glad to be of service :)

GL
Mike
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…
Suggested Courses

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question