|
|
hi,
i'm tring to set up BlueTooth communication between 2 PDA's.
in my client side,i wrote this part of code:
WSAQUERYSET Wsaq;
ZeroMemory(&Wsaq,sizeof(Wsaq));
Wsaq.dwSize = sizeof(Wsaq);
Wsaq.dwNameSpace = NS_BTH;
Wsaq.lpcsaBuffer = NULL;
if(WSALookupServiceBegin(&Wsaq,LUP_RETURN_ALL ,&hlookup) == SOCKET_ERROR)
{
ErrorValue = WSAGetLastError();
ErrorString.Format(_T("%d"),ErrorValue);
AfxMessageBox(TEXT("WSALookupServiceBegin() Error
Number ")+ ErrorString);
return;
}
.
.
.
also,in my header file there is #include<winsock2.h> & i've imported ws2.lib,
but i always gets this error:
BTexampleDlg.obj : error LNK2019: unresolved external symbol "int __cdecl
WSALookupServiceBeginW(struct _WSAQuerySetW *,unsigned long,void * *)"
(?WSALookupServiceBeginW@@YAHPAU_WSAQuerySetW@@KPAPAX@Z) referenced in
function "protected: void __cdecl CBTexampleDlg::Onstart(void)" (?
Onstart@CBTexampleDlg@@IAAXXZ)
ARMV4Rel/BTexample.exe : fatal error LNK1120: 1 unresolved externals
(i've got the same error with WSALookupServiceNext() function and
WSALookupServiceEnd() function).
can someone please help me?
my email is : Eliv@Roadeye.co.il
thanks,eli.
|
|
|
|
|
|
Have you imported "ws2_32.lib" ?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hello,
I would like to know whether it is possible to listen to a specific EM_/EN_ message from CEdit informing the caret has been moved to a different position? Is there such a message? Or do I have to listen to the OnChar event and from there call GetSel(...,...) to know the caret position?
All comments are very appreciated,
David
|
|
|
|
|
Hi..
I have created some directories and sub directories using the Unicode function "CreatedirectoryW()" as the full path exceeds 260 chars..and it was succesful from the code point of view..
Though I created these when i decided to access them from windows I couldn't do so..It is throwing an error that "can't access this folder.Path is too long"..
If this is the case what is the purpose of Using Unicode function to create directories which exceeds 260 chars limit??
Is there anyway we can access these files???
Thanks
Sudhakar
|
|
|
|
|
Sudhakar Pasupunuri wrote:
If this is the case what is the purpose of Using Unicode function to create directories which exceeds 260 chars limit??
Is there anyway we can access these files???
You can access paths over 260 characters by adding "\\.\" to the beginning of the filename. Remember to escape the backslash.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Thanks for the valuable info But my question here is :
I want to acceess these files from windows explorer and not through code..
The end user want to open the file and want to see the contents using windows explorer..But then windows throws error that "cann't access the folder/file path is too long "..
Plz help me out in this..
Thanks
Sudhakar
|
|
|
|
|
Sudhakar Pasupunuri wrote:
I want to acceess these files from windows explorer and not through code..
The end user want to open the file and want to see the contents using windows explorer..But then windows throws error that "cann't access the folder/file path is too long "..
Oh, well in that case there's absolutely nothing you can do about it. It is a limitation of Windows explorer. If you want them to be able to access it, you'll have to make the path names shorter.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I am looking to develop an application which prevents a CD to be coppied.Once it is installed should genrated a unique number through its BAIOS that it cant be duplicated.
THX
|
|
|
|
|
What's a BAIOS ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hi All,
I want to hide the left pane(index, search,context) of the help widow using function HtmlHelp ., but i don't know what's the parameters for HtmlHelp(...) .Is there any other things i should do for it?
Thanks!
YunYan
|
|
|
|
|
I have a static function inside a class. It is actually a seperate thread, so it has to be static. Is there a way that I can access normal members of the class from the static thread funcion? Any help is appreciated.
-Dev578
|
|
|
|
|
This has to be about number #1 question asked here at the C++ forum. Mike Dunn's explains it in detail in his Visual C++ FAQ[^], item 6.1. HTH
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
You should use FindFirstFile and FindNextFile, and check returned WIN32_FIND_DATA structure for FILE_ATTRIBUTE_DIRECTORY attribute. The other function to get current directory, is GetCurrentDirectory not GetDirectory.
Arsalan Malik
|
|
|
|
|
BOOL DirectoryExists(LPSTR Dir)
{
if(GetFileAttributes(Dir) == (DWORD)-1)
{
if(GetLastError() == ERROR_FILE_NOT_FOUND)
return FALSE;
else
return TRUE;
}
}
wWw.KruncherInc.cOm
|
|
|
|
|
|
You can also use _access() as in:
if (_access("c:\\MyDir", 0) == 0)
;
else
;
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
Use FindFirstFile
jon
using System.Beer;
|
|
|
|
|
Hi,
I am using win32 API programming, I want to handle the selected windows in task manager, when we click minimize, maximise options for selected windows. How can I get the selected window(s) handle to send our user defined message.
I need to send some own message, before OS sending minimize/maximize message. Is it possible to get the handle please help me.
Thanks in Advance
|
|
|
|
|
Use FindWindow or FindWindowEx function in API. This will take window class and name as parameter, and will give you handle, if found. You can find window class using Spy++ utility, that comes with Visual Studio.
Arsalan Malik
|
|
|
|
|
try making a program that gets the window from point.
for example when you click somewhere on the screen the program would show you on a dialog box on some static text info about the window.
Use
WindowFromPoint()
gabby
|
|
|
|
|
Hi all,
Kindly clarify my doubt
I am developing the dialog based application in VC++.
I have created 10 buttons having captions like Bold, Italic, Underline, Right alignment, etc.
Some buttons can be enabled and some disabled.
My question is:
The tooltip is active ONLY for the enabled buttons.
I need to implement tooltip for the disabled buttons also
It will be great if anyone could help me
Thanks in Advance,
Chinna
|
|
|
|