|
how to access drives(including cd-drive) along with icons and display them on dialog and how to enable/disable drives permanently based on selection?
|
|
|
|
|
Like this?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Exactly David, but how to get registered version?
The same way i m planning to do vc++?
Any guidence is appreciated.
|
|
|
|
|
Super Hornet wrote: ...how to get registered version?
Purchase it from here.
Super Hornet wrote: The same way i m planning to do vc++?
Check out the HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives key. While this will indeed hide the designated drives, it does not restrict access to them. There is another registry key that you can use that will allow only administrators to use the (CD-ROM and floppy) drives.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
In a similar way as i described in reply to your question entitled:
"How to disable USB Port/Drive permanently?"
registry, registry once more registry ......
|
|
|
|
|
Hi,
I have a client/server application which I have implemented using CSockets using serialization (as per Microsoft help on CSockets). This works really well, but the customer is now asking to be able to access to the server application using his web browser rather than my custom built client and I havent a clue as to how easy/hard this is going to be.
Anyone have some suggestions of what I would need to do to create web pages that request info from my server, and what changes I would need to make to the server?
Thanks.
Tony
|
|
|
|
|
|
Can you rewrite your server application as an ISAPI Extension[^] and just use IIS?
|
|
|
|
|
we can put the application in startup but its not the preferable method, Is there any better way of running an application at windows startup?
Suggestions are appreciated.
|
|
|
|
|
You can edit Windows registry:
RootKey="HKEY_LOCAL_MACHINE"
OpenKey= "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"
or
OpenKey= "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce"
for running an application once at win startup
Add new REG_SZ value type, which data is the path for your application
I've tried it with Win 2000
|
|
|
|
|
Thank you newbie its quite useful.
|
|
|
|
|
You can also use the root HKEY_CURRENT_USER with the same keys if you want to limit the app to a specific user. Also avoids the security issues around apps not being able to write to HKEY_LOCAL_MACHINE.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
|
Super Hornet wrote: Is there any better way of running an application at windows startup?
Make it a Windows Service[^] There is a C++ Application Wizard that supplies a starter project for a Service.
led mike
|
|
|
|
|
Hi,
I'm using MFC extension dll.
I've 2 questions.
1. Why do i get exception while trying this:
char* s1 = "";
char* s2 = abc";
strcpy(s1,s2); //exception
But if i try this it works:
char s1[255];
char* s2 = abc";
strcpy(s1,s2);
Why is this so?
2. I've an exposed function BOOL _stdcall SetName(CString& name)
There is a function defined in another class but in same dll as below.
void CMyClass::Myfn(CString& str)
{
m_str = str;
}
where m_str is CString variable declared in header and initialized as
m_str = "" in CMyClass constructor.
I create an object of CMyClass and call Myfn() in SetName.
SetName is called from a vb.net application.
I get exception while assigning m_str = str in Myfn();
(This works fine if i'm calling the dll from an MFC application.)
I solved the problem by making the following changes.
m_str declaration as char m_str[255] and removed initialization from constructor.
Myfn() as
void CMyClass::Myfn(char* str)
{
strcpy(m_str,str)
}
But how did it work? Will it create problem in anyother scenario?
Thanks & Regards,
sanju
|
|
|
|
|
s1 has not enough space to write the content of s2 in it
|
|
|
|
|
For the second question (tox already answered the first): this is simply due to the fact that a CString class (yes, it is a class) is not compatible with whatever VB uses to represent a string.
|
|
|
|
|
1. sanjutvm wrote: Why is this so?
because you've only allocated one byte for s1.
2. just guessing here... tough to say based on what you've shown us. but i doubt vb.net knows anything at all about MFCs CString class. generally, when exposing functions to be called from other languages, it's best to stick to primitive types:
BOOL _stdcall SetName(const char *pName)
{
Myfn(pName);
}
|
|
|
|
|
Hi All,
Thanks for the reply.
How do I perform strcpy on two char* variables?
Thanks & Regards,
sanju.
|
|
|
|
|
you simply have to assure that the destination buffer is large enough to hold the source.
|
|
|
|
|
Hi,
Thanks for the reply.
That means i cannot simply use char* as destination in strcpy. I'll have to use char* s = new char[some value].
Thanks & Regards,
sanju.
|
|
|
|
|
correct. or, if you know your strings will always be smaller than a certain size, you can use something like:
char buf[MAX_SIZE];
strncpy(buf, inputString, MAX_SIZE-1)
|
|
|
|
|
Hi,
Thank you.
Thanks & Regards,
sanju.
|
|
|
|
|
Hello,
I need a class which I can work with a huge floating point numbers and make an operations with them like *-/+
for example: 122354554654549878987.003253265465454597 * 65465465456654564.3212154654
I need something like this http://www.codeproject.com/cpp/largenumber.asp[^] but with floating point numbers.
Is there any class like I want?
SnaidiS(Semion)
|
|
|
|
|
Why won't you use long double type?
|
|
|
|