|
|
When we mount two paritions of a USB drive (HDD) such that Drive A: is mounted in a folder of drive B: and Dirve B: is mounted in a folder of Drive A: i.e. create recursive mount points. Thus the mounted points (folders in which drive are mounted) have current GUIDs of the partitions of USB drive. If user plug off this USB drive and plug on to another system. Thus the system will assign new GUIDs to USB drive partitions. But the mounted points previously created have olders GUIDs i.e. the one that was assigned to these folders when the mount points were created (NOTE: we get these GUIDs using DeviceIoControl). So, when we pass these GUIDs as path to the CreateFile method, it fails because new GUIDs are assigned to the partitions. But these GUIDs are valid if we pass as path in CFileFind.
So, what is actually happening in these cases i.e. for CreateFile and CFileFind ?
How these mount points (created on USB drive) be valid on the other system ? Although these mounts are valid if we access through windows explorer.
|
|
|
|
|
Hello!
Anybody knows how to make EditBox to accept only bitwise strings (0 and 1), something like ES_NUMBER that allows only digits to be entered into the Edit Control.
SzyKam.
|
|
|
|
|
I don't know such a control but you can do one yourself quite easily: create a new class (CBitwisEdit for example) that inherits from the CEditCtrl. Override the OnChar function. Inside this function, check if the char entered is either '0' or '1'. If this is the case, call CEditCtrl::OnChar, otherwise don't call it.
|
|
|
|
|
hi,
In order to Accept Numeric Values in the EditControl, You have to SubClass the EditControl by Creating a new CEdit Class and specify the Messages.
In our Instance WM_CHAR. in the WM_Char Message check for the Only Numeric Variable.
Think Clever.
Uday kiran
|
|
|
|
|
Hi Friends,
We are developing an application which will start when the computer starts and the system will shutdown when the application is closed.
I want to hide the windows 'start' menu so that user can not access any other soft wares from the system apart from our application.
Can any one pls suggest any function and how to hide the start menu on the start up
Thanks in Advance,
Dinesh
|
|
|
|
|
switch to another desktop...
|
|
|
|
|
It seems you need to
<br />
<br />
FindWindowEx(FindWindow("Shell_TrayWnd", NULL)->m_hWnd, <br />
0, "Button", NULL)->ShowWindow(0);<br />
<br />
FindWindowEx(FindWindow("Shell_TrayWnd", NULL)->m_hWnd, <br />
0, "Button", NULL)->ShowWindow(1);<br />
<br />
<br />
|
|
|
|
|
do you think seriously (even if it does work for hiding the start button) that it will prevent, as the OP wants, to users to launch applications ?
the windows+R keyboard combination allow the user to reach the "Run..." dialog, Windows+E keys, to launch the explorer...
i don't think this "security reason" should be solved like this...
|
|
|
|
|
WhiteSky wrote: FindWindowEx(FindWindow("Shell_TrayWnd", NULL)->m_hWnd,
0, "Button", NULL)->ShowWindow(0);
FindWindowEx(FindWindow("Shell_TrayWnd", NULL)->m_hWnd,
0, "Button", NULL)->ShowWindow(1);
your Window will hung after some time !
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
It has a mistake/**/ and FindWindowEx(..... was a code and you can use from CWnd.Did you get my mail!?
|
|
|
|
|
|
Hello,
I am having a dialog-based MFC application, in which I have placed a RichEdit control, and I want to trap the F9 key, which I am not able to do. Please help.
Software Developer
Sanjay Khapre
|
|
|
|
|
I am Developing an application for Windows Mobile,Using VS2005 and SQLite Database.
I am facing two problems.
1.Database is always cleared every time I am reloading the application.
2.I cannot bind the data to the List View as Columns, I can bind only one column.
Please Anybody help me
|
|
|
|
|
Sri harini wrote: 1.Database is always cleared every time I am reloading the application.
This seems to sqlite configuration problem.. please check the api called to operate the SQLite DB in your program!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I made an application which used a dll and loads it dynamically. If dll is not present an exception raises. All i want is if dll is not present it should be known at the Loadlibrary(..) call and i could handle that exception. I have specified lib fiel of that dll in the tools->project settings->link tab. Is there any other way?
Thank you
KIRAN PINJARLA
|
|
|
|
|
LoadLibrary() returns NULL if it can't load the DLL. If you're getting an exception, I bet you're not checking the return value from LoadLibrary() and blindly using it.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Michael Dunn wrote: I bet you're not checking the return value from LoadLibrary() and blindly using it.
U lost.
I am checking the return value. Here is my code.
if((h = LoadLibrary("..\\Output\\DllOne.dll")) == NULL)<br />
{<br />
AfxMessageBox("Failed To Load Library");<br />
return;<br />
}<br />
COne one;<br />
one.ShowMsg();<br />
FreeLibrary(h);
Let me explaint what is happening exactly. My client application is a dialog based app. I wrote the above code in a button press. It should load and return value when button is presse.
But the problem is even the dialog is not being displayed. Even before that its showing the exception
"THE APPLICATION FAILED TO START SINCE ATHE one.dll IS NOT FOUND. REINSTALLING THE APPLICATION MAY FIX THE PROBLEM"
right after executing x.exe file.
Can u help me now?
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: "THE APPLICATION FAILED TO START SINCE ATHE one.dll IS NOT FOUND. REINSTALLING THE APPLICATION MAY FIX THE PROBLEM"
This must not be using CAPS, for sure.
You must be be implicitely linking that dll, too. If you are using LoadLibrary , its not needed.
You need to use either of them.
|
|
|
|
|
prasad_som wrote: You must be be implicitely linking that dll
no iam not.I am only using LoadLibrary() to load.
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: No I am not
Yes you are. From your first post:
kiran.pinjarla wrote: I have specified lib fiel of that dll in the tools->project settings->link tab
That means implicitely linking to the dll. Remove that and all should be ok.
-- modified at 6:48 Thursday 24th August, 2006
|
|
|
|
|
Cedric Moonen wrote: Remove that and all should be ok.
I removed it. It showing Unresolved symbols error now.
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: It showing Unresolved symbols error now.
Please when asking a question be more explicit and detail your problem.
Did you include header files coming from the library ? Where some classes are defined ? If yes, you need to remove them.
When using explicit linking to a dll, you don't include anything (lib, headers, ...) in your project. You just call LoadLibrary and GetProcAddress with the name of the function you want to retrieve. And that'is.
|
|
|
|
|
Thnak you for ur reply.
I am not exporting a function in my dll. I am exporting a class and I am instantialing it in the client application.
if((h = LoadLibrary("..\\Output\\DllOne.dll")) == NULL)<br />
{<br />
AfxMessageBox("Failed To Load Library");<br />
return;<br />
}<br />
COne one;<br />
one.ShowMsg();<br />
FreeLibrary(h);
If i remove the header file its showing an error.
error C2065: 'COne' : undeclared identifier
How to proceed.
KIRAN PINJARLA
|
|
|
|
|
You cannot export a class explicitely (or at least not that way). Why do you want to load the dll explicitely ? Just load it implicitely (put the lib in the project settings like you did and add the header and source file of your class to your project). And that's it. Do you have the source file of your class ?
|
|
|
|