|
hi..
I need to block bluethooth through code so thar no one is able take my code by using any other bluethooth device..
If u cn plz help me..
|
|
|
|
|
tanu misra wrote: so thar no one is able take my code by using any other bluethooth device
What do you mean ? You believe that by having bluetooth turned on, people will be able to steal your code ? Which code anyway ?
|
|
|
|
|
hi..Mr.Moonen
I just really need to code for this problem
if u cn help me plz do so........................
|
|
|
|
|
If you want help, you have to explain your problem more in details. If you didn't get any answers till now, it probably means what you are trying to do is not feasible (besides, not all computers have BT by default). So, what is your problem exactly ? Why do you want to turn BT off ? What were you saying with your code ?
And please, don't use text speak, it makes your post much more difficult to read.
|
|
|
|
|
hi..
My Exact Prob is that Im making a small project
on bluetooth,and I want that my project has option through which a user can disable the access through bluetooth..
Thanks
|
|
|
|
|
If it's that urgent, wouldn't it be simpler to just disable it via Windows? You'll spend more time reading from and posting to this forum than you would by just opening some Control Panel applet and turning BT off.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
hi..
Does any body have Idea of how to turn off bluetooth through code in computer,so that it is not able to connect with any other bluetoth device.
Thanks
|
|
|
|
|
If it's a registry setting, you could use regmon to see what key/value is changed.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
hi.
Sry bt its not registry setting,it has to be done through sum code in c/c++
|
|
|
|
|
I was not aware that the registry could not be changed via code. Hmmm, you learn something new each day.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
hi..
Know Im able to disable bluetooth throughcode,but it ask for a restart.
But I dont want to restart the system..
can anyone help me in this regard.
And after sum search I found a function named BluetoothSetServiceState() It is used to disable bluetooth..
but it is not working,neither it is giving any error..
Does any 1 have any idea about this function,how to use it?
Thanks in advance
Nidhi.
|
|
|
|
|
tanu misra wrote: And after sum search I found a function named BluetoothSetServiceState() It is used to disable bluetooth..
but it is not working...
What does it return?
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Syntax-
DWORD BluetoothSetServiceState(
HANDLE hRadio,
BLUETOOTH_DEVICE_INFO *pbtdi,
GUID *pGuidService,
DWORD dwServiceFlags
);
Return Value
Returns ERROR_SUCCESS upon successful completion. The following lists common errors.
Return code Description
ERROR_INVALID_PARAMETER The dwServiceFlags are not valid.
ERROR_SERVICE_DOES_NOT_EXIST The GUID specified in pGuidService is not supported.
E_INVALIDARG dwServiceFlags is set to BLUETOOTH_SERVICE_DISABLE and the service is already disabled, or dwServiceFlags is set to BLUETOOTH_SERVICE_ENABLE and the service is already enabled.
|
|
|
|
|
Um, why are you sending this to me?
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
hi
I though u asked me that what does this function return..
|
|
|
|
|
I did. You were supposed to tell me what it returns when you use it.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi..
it returns me following error
ERROR_SERVICE_DOES_NOT_EXIST,which means GUID does not exist..
|
|
|
|
|
hi..
NEED HELP those who have laptops with inbuild bluetooth plz tell me the services used by bluetooth you can find bluetooth sevices in task manager these services will start from BT... or bt... and manufacture of driver used by bluetooth..
Thanks
|
|
|
|
|
as I've heard, the class wofstream narrows every thing when it writes to a file. that is it converts every wide character to a single byte one and then writes it to the file. in this way you can't have such a thing as:
<br />
wofstream out(L"foo.txt");<br />
out << L"unicode string";<br />
so there is one question: what's this WIDE class useful for?!! how you name it WIDE version of "ofstream" while it can't be used with wide characters?
and one more thing: why it takes a parameter of type char* as the file name? it's a wide class any way
|
|
|
|
|
wofstream is a type definition of the basic_ofstream class with the wchar_t data type.
And so it supports wide characters.
The 2 statements that you have written are definitely possible.
|
|
|
|
|
no it's not! it just creates an empty file. I've tried it 10's times.
|
|
|
|
|
Have you tried writing the BOM (Byte Order Mark) header in the beginning of the file?
|
|
|
|
|
yes I have. to be more clear, this damn class writes ASCII characters quiet well. the problem I have is about non-English characters.
<br />
wofstream of (L"FileName.txt");<br />
of << L"English";
of << L"فارسی";
of.close();<br />
|
|
|
|
|
Have you tried calling std::basic_fstream<type>::imbue with the locale of the text you want to write?
Have a read of Kreft and Langer "Standard C++ IOStreams and Locales" for as many details as you can take and then a few more.
Cheers,
Ash
|
|
|
|
|
no I have not, and thank you for your clue. I'll read it as soon as return back my home. and one more thing, could you please show me some more resources on these new things (STL::locals). I've no previous experience on that.
|
|
|
|