|
I'd like to be able to mount "myspecialnetworkdrive" to my Z: drive.
I'd like the file list, and file contents to be under my program's control -- i.e. I would be the network source of those.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
Look at the WNetAddConnection3 API.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
|
you can always call the process subst
SUBST [drive1: [drive2:]path]
SUBST drive1: /D
drive1: Specifies a virtual drive to which you want to assign a path.
[drive2:]path Specifies a physical drive and path you want to assign to
a virtual drive.
/D Deletes a substituted (virtual) drive.
Type SUBST with no parameters to display a list of current virtual drives.
My Essential Code blog - http://codesos.blogspot.com/
|
|
|
|
|
Use My Commander http://myco.yonan.ro - use F7 key.
|
|
|
|
|
Hi,
please let me know how to merge two Xml files..ie i have an xml old Xml file(A.xml) and i need merge this Xml file to a new Xml file(B.xml) ..So that i can see the values of both old and new Xml files in New Xml File(B.xml)...
im using Win32 Console project..
modified on Friday, June 5, 2009 2:14 AM
|
|
|
|
|
The first thing you need to do is understand the contents of the two different files and how they should co-exist under a single root element (for that is a requirement of XML). One options could be:
<Root>
<first-file>
<!-- Put the contents of the first file here -->
</first-file>
<second-file>
<!-- Put the contents of the second file here -->
</second-file>
</Root>
But really, it depends on your requirements!!!
BTW - if you're asking technically how you might do it? Use MSXML or libxml to read the two files in. You then have access to the DOM of each XML file. Create a third DOM by combining the two existing DOMs in the way you've decided is best. Write out that third DOM to a file and voila! you have a merged XML file!
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
if possible can u suggest me any sample...?
|
|
|
|
|
What did I tell you before?[^].
Believe me, that's what I'd be doing. I'd see one of the top[^] two[^] results (which are VB, rather than C++ - but they use MSXML) and convert them to C++ to match my needs.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
English user name (logon name - not real name) can be displayed properly by 12 ASC characters.
I am not sure if 6 WORD characters (same size as 12 ASC chars) are good enough for user name in all other languages.
assume there are over 100K of users in each of non-english language.
If you know any language other than english, please give me suggestion, because length of user name is related to database and hard to be changed afterwords.
thanks.
|
|
|
|
|
You need 1 byte to store 1 ASCII character.
You need 1 or more bytes to store UTF encoded characters.
In Windows, UNICODE takes 2 bytes for 1 character.
You should be able to do your calculations based on this.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Try to rearrange your post. As it stands it doesn't make much sense.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi Guys
I'm working on CMS Project, this is big project.
i 'm developing a Server so that client send data to Server, and Server will insert or query data to/from SQL Server 2005.
my question is:
1 - When client send data to Server. i open new Connection -> insert data to SQL then close Connection OR i only open connection at starting CMS Server and then client send data to server -> insert data direct to SQL Server, because Connection always opening. Client will send too much Data to CMS Server
2 - Do i need make 2 connections:
- 1 For Update Database(Insert,Update,Delete) always Open
- 1 For Query Data. i mean if 1 Client send request to Query Data from CMS Server. At that time CMS Server Open connection to SQL Server -> Query Data -> Close Connect
I mean 1 connection to Update Data always Open, 1 connection to Query data always Open and Close data. because Client sometime send request to get data.
Thanks and best regards
THien Nguyen
|
|
|
|
|
it depends if database connection is very fast.
Eg, if server and database are on same local network, you may close connection after doing something. Otherwise you have to let the connection open for lifelong, or server is too tired with database connection.
2 connections are absolutely bad design, if you want to limit query/update for a user, you can add limitations (such as doing only once in 5 minutes) to his ip (socket).
|
|
|
|
|
you said that "2 connections are absolutely bad design" could you please plain me why bad design?
Thanks and best regards
|
|
|
|
|
Hi,
How can I create an Array that contains CObArrays. For Instance, I have something like this, but isn't working right.
CObArray1 a;
CObArray2 b;
for(int i=0; i< 10; i++){
b.Add(&a);
}
CObArray ReadAtindex3.Copy( *(CObArra*)b.GetAt(2) );
|
|
|
|
|
Software2007 wrote: CObArray ReadAtindex3.Copy( *(CObArra*)b.GetAt(2) );
You should split this into 2 lines.
CObArray ReadAtindex3;
ReadAtindex3.Copy
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I have it split up, but doesn't work. I am using b.add(&a), is this actually adding an array every time I hit it, or does it replace the contents of the arrays with the new one? How would you build an array of CObArray arrays?
"Failing to prepare is preparing to fail"
|
|
|
|
|
|
tuan1111 wrote: All running on a computer not installed any OS yet.
Please Explain
|
|
|
|
|
What do you need? install OS?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Could you please read the posting guidelines[^] ? You've been posting such questions for a while now and it's time for you to learn how to ask your question properly (well, if you want some help).
|
|
|
|
|
tuan1111 wrote: All running on a computer not installed any OS yet.
You simply can't do that. Any other question?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I posted a feedback issue
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=463503
Essentially code that was working in VC6 listed below does not compile:
const char* trimChars = "\\/|*?'\"<>;:";
std::remove_if(
fileName.begin(),
fileName.end(),
std::bind1st(std::ptr_fun(strchr),trimChars)
);
The only work around I could think of was to wrap strchr inside another function like this:
char const* compare(char const* str, int c)
{
return ::strchr(str,c);
}
Is this a bug in the compiler or am I missing something?
--Joe
If winter comes is spring far behind? - (PBShelley -Ode to the West Wind)
|
|
|
|
|
Microsoft have added a second overload for strchr (one uses char*, one uses const char*). You need to cast strchr to the function type you need, to disambiguate for ptr_fun. Here, I've used static_cast to specify the const char* variant of strchr.
std::remove_if(fileName.begin(), fileName.end(),
std::bind1st(std::ptr_fun(static_cast<const char*(*)(const char*, int)>(strchr)),
trimChars))
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|