|
|
is it possible to prevent the user from left clicking on USB drive icon but allow to right clicking?
i would appreciate if some one post an example for it
|
|
|
|
|
jon ray wrote: is it possible to prevent the user from left clicking on USB drive icon...
Within Windows Explorer?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
sorry for the late reply i was very busy until yesterday and yes within windows explorer
|
|
|
|
|
See if this helps. Also see here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi
I am using VC++
and i want to change the access of usb device form read and write to read only.
i have understood that ACL can do that.
i would like to know more information about how do we use
ACL in vc++ to change the access of usb device
thanks
Anil Veeraghattapu.
|
|
|
|
|
you can change access of usb device through registry.
Registry path
[code]
LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\StorageDevicePolicies"
[/code]
just you change the values
[code]
"0" to "1"
WriteProtect="1"
[/code]
|
|
|
|
|
I dont want to change it from the registry
i want to do it from the vc++ code
by using win32 api
i have understood that for usb device driver objects ACL if we added the ACE, then we can change it.
but i would like to know which api should i use to achieve this
|
|
|
|
|
Anil709 wrote: I dont want to change it from the registry
i want to do it from the vc++ code
Are you of the thinking that code cannot be used to manipulate the registry?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
i dont want to do anything with the registry
all i want to do is to use win 32 api
and to get the handle of the device and apply acl to it
if you know how to apply ACL on the usb device please help me
thanks
Anil Veeraghattapu.
|
|
|
|
|
|
How to find the language installed or Language package exists or language in OS will support or not?
I failed to use GetUILanguage and EnumUILangauges API's. Any suggestions?
|
|
|
|
|
What problems did you face with using EnumUILanguages .
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Actually i didn't understand how to use the API, and also i didn't find any sample for it . If you can help me on how to use this API it will be very useful for myself.
|
|
|
|
|
Here goes -
BOOL CALLBACK EnumUILanguagesProc(
LPTSTR lpUILanguageString,
LONG_PTR lParam
)
{
MessageBox(0, lpUILanguageString, 0, 0);
return TRUE;
}
int main()
{
EnumUILanguages(EnumUILanguagesProc, MUI_LANGUAGE_NAME, 0);
}
If you want the language id instead of the language name, replace MUI_LANGUAGE_NAME with MUI_LANGUAGE_ID.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
To check if the operating system supports the language I believe that you can just call the IsValidLanguageGroup Function[^]
Such as:
BOOL bSupported = IsValidLanguageGroup(LGRPID_INDIC,LGRPID_SUPPORTED);
BOOL bInstalled = IsValidLanguageGroup(LGRPID_INDIC,LGRPID_INSTALLED);
Best Wishes.
-David Delaune
|
|
|
|
|
IsValidLanguageGroup(LGRPID_SIMPLIFIED_CHINESE | LGRPID_TRADITIONAL_CHINESE, LGRPID_INSTALLED);
is returning false when i tried in Windows XP Chinese, but it is returning true in English OS where East Asian language pack installed
|
|
|
|
|
kiranin wrote: IsValidLanguageGroup(LGRPID_SIMPLIFIED_CHINESE | LGRPID_TRADITIONAL_CHINESE, LGRPID_INSTALLED);
is returning false when i tried in Windows XP Chinese, but it is returning true in English OS where East Asian language pack installed
#define LGRPID_TRADITIONAL_CHINESE 0x0009 // Traditional Chinese
#define LGRPID_SIMPLIFIED_CHINESE 0x000a // Simplified Chinese
#define LGRPID_THAI 0x000b // Thai
0x000a | 0x0009 == 0x0B
You just confirmed that the LGRPID_THAI language is not installed on the Windows XP Chinese computer.
Change your code to:
BOOL bSimpleInstalled = IsValidLanguageGroup(LGRPID_SIMPLIFIED_CHINESE, LGRPID_INSTALLED);
BOOL bTradInstalled = IsValidLanguageGroup(LGRPID_TRADITIONAL_CHINESE, LGRPID_INSTALLED);
Best Wishes,
-David Delaune
|
|
|
|
|
Thanks David,
And one more question is there a way to find the Language for Non Unicode programs which can be set through Regional and Language options?
|
|
|
|
|
|
Hi All,
I am facing a serious issue while command line compilation of VC6 COM dlls.
My application will compile several dlls one by one using MSDEV.exe. After compiling some dlls, application will hang on due to indefinite waiting in Registration process of compilation. It will not specific to one particular dll, some times same dll will compile another time it will struck.
It is very much killing me, what might be reason?
If any one have any idea what may be the issue, Please share with me.
Thanks in advance.
Kind Regards,
Sreeram
T.sreeram Murthy
|
|
|
|
|
Hi, I am facing a crash while calling the function CreateWindowEx ,
Here is the code piece i am using.
WNDCLASSEX WndClassEx;
memset( &WndClassEx, 0,
sizeof(WNDCLASSEX) );
WndClassEx.lpfnWndProc = AVThreadMessageProcedure;
WndClassEx.hInstance = (HINSTANCE)g_hModule;
WndClassEx.lpszClassName = AVTHREAD_WINDOW_CLASS;
WndClassEx.hIcon = hIcon;
WndClassEx.hIconSm = hIconSmall;
WndClassEx.cbSize =
sizeof(WndClassEx);
CreateWindowEx( 0, AVTHREAD_WINDOW_CLASS, L
"", 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, (HINSTANCE)g_hModule,(LPVOID)this );
Here I am passing the pointer of the calling class in last argument. Application is not crashing always but some time it crashed at this point.
Can you please give some idea about what wrong i am doing here.
Thanks in advance.
Birajendu
SonicWALL
Bangalore
India
|
|
|
|
|
Where is the RegisterClassEx() called?
|
|
|
|
|
Yeah, ofcourse that is being called successfully with out any error.
Birajendu
SonicWALL
Bangalore
India
|
|
|
|
|
May be some problem with the AVThreadMessageProcedure() function? Did you try putting a break point int that function and debug?
|
|
|
|