I've got a tiny helper application that I've built that creates text files on a network/shared drive.
I'm presently just using CStdioFile to create the text files.
The problem that I am running into is username/password authentication. I don't really know where to start for this and would appreciate some pointers in the right direction. The network/shared drive is "\\S-CPU1\c\the_folder". If I open up IE, and go to \\S-CPU1\c\the_folder ... the first time I try it, IE asks for the username/password. I enter it in, it goes there. I can then close out of IE and it "remembers" the username/password combination (or keeps me logged in to it, or whatever) until I physically LOG OUT or switch users. So, if I do that one time, I can then run my helper app, and it creates the files over on that shared folder without a problem.
The problem is I would like to automate this, so that I/the user does not have to first bring up IE and go through that process (and I don't want to physically MAP a drive to that folder). I would like to be able to run my app, and if it realizes that it needs a user/password to access that folder, it will go ahead and bring up a prompt asking the user for that information. After that point, it'll just roll through and do it's thing.
I've searched for several phrases in the articles on this site, but can not seem to find anything that is doing what I want. If someone could point me in the right direction, I would greatly appreciate it.
lpLocalName :Points to a null-terminated string that specifies the name of a local device to redirect, such as "F:" or "LPT1". The string is treated in a case-insensitive manner.
If the string is empty, or if lpLocalName is NULL, the function makes a connection to the network resource without redirecting a local device.
I have written an ATL 3.0 project including two sample classes named CAttachment & CAttachments. These classes have interfaces IAttachment & IAttachments in order. IAttachments has got a method named "Item" that returns a result of the type of IAttachment. But before returning the IAttachment, I want to call some member functions of the CAttachment class to setup the IAttachment properly. I know how to create the IAttachment interface, but I don't know how to have access to the members of the CAttachment from the Item method. I will be thankful if anybody replies to me.
How is the CAttachments object producing the interface IAttachment to return?
Presumably you must be making a CAttachment object somewhere, or do you have them already created and you're just holding a list of the IAttachment interfaces?
Just havethe desired path .NET\Vc7\INCLUDE appear before the \Microsoft Visual Studio .NET\Vc7\include in your project "include" directory settings. There's "move up/down functionality in the prop page.
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocale
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocnum
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\streambuf
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xmemory
When I compile in 6.0, the inclusion of
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include
has no effect.
When I use the Studio IDE or look directly at the .DSP file, i don't see anywere that I can place the Studio.NET-Vc7 version AHEAD OF the 6.0-VC98 version of these files.
Do this Tools | Options. Find Projects | VC++ Directories. Change the order of the Include Files (select from the combobox at the upper right). Just move the desired directories to the top, even add new ones if you wish