|
Hi Everyone
Does anyone know if the Winsock API's can be used to connect between Desktop and Pocket PC running Windows CE???
If not, what's the alternative?
Thanks,
Cheers
Yogi
|
|
|
|
|
what ever be the operating system the TCP/Ip stack is same
u can use client app on pocketpc side srvr app on Desktop side
just u use unicode on client side
anju
|
|
|
|
|
What MS Dev. Kit contains the SSPI libraries? I can't seem to find Secur32.lib anywhere in VC6.
Thanks!
. djrisc .
|
|
|
|
|
User mode or kernel mode?
User mode: its all in Secur32.lib
Kernel mode: hand over lots of cash to MS and buy the IFS kit.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
Hi!
I have a little game in OpenGL that I run in a window. So, I want to display some debug info in that window with the GDI API.
The problem is that when I fill a rect with the gray color (for ex.) OpenGL redraw the all window and not only his viewport. Somebody could help?
thanks
Signed Twofy.
If you havn't answer to your problem, that because you havn't a problem.
|
|
|
|
|
I am trying to use the function UrlEscape() declared in shlwapi.h. I have the latest SDKs, have made sure that shlwapi.h has been #include d and that I am linking with the shlwapi.lib library. My problem is so stupid that I don't know what to do. I have done everything I could think of short of pulling my hair.
The compiler says, "UrlEscape: undeclared identifier".
What is wrong? What am I missing? I have made sure that the constants _WIN32_IE and _WIN32_WINNT are appropriately defined. Everything is alright, as far as I can determine, but I still am getting this error.
Am I missing something obvious? Would somebody please tell me what it is?
Mucho thanks.
Regards,
Rohit Sinha
|
|
|
|
|
The problem has corrected itself on its own. I closed Visual Studio in frustration and started again after sometime. This time everything compiled correctly.
Dunno what's going on. Spooky.
Regards,
Rohit Sinha
|
|
|
|
|
Hi Rohit,
Apparently i am also using the same function. However I get a different error
which says "too many initializers".
Please can you give an example of how to use this function.
Would be very greatful to you.
Thanks,
John
|
|
|
|
|
Here you are. For the exact meanings of the parameters, and return values, check your MSDN. I have not compiled or tested this, so be careful before you use it.
CString UrlStr = "http://www.somesite.com/start page.htm";
DWORD cchBuffer = 1;
TCHAR temp;
HRESULT hrUE = UrlEscape(UrlStr, &temp, &cchBuffer,
URL_DONT_ESCAPE_EXTRA_INFO | URL_ESCAPE_SPACES_ONLY);
LPTSTR pOutStr = UrlStr.GetBuffer(++cchBuffer);
hrUE = UrlEscape(UrlStr, pOutStr, &cchBuffer,
URL_DONT_ESCAPE_EXTRA_INFO | URL_ESCAPE_SPACES_ONLY);
UrlStr.ReleaseBuffer(cchBuffer);
Hope this helps.
Regards,
Rohit Sinha
|
|
|
|
|
Hi there,
I want to add a feature in my program that user can change the language …
For example in a OS, I installed 3 languages like English U.S and Farsi and Russia.
I want to change the active language (English U.S) to other language (Farsi), programically …
How can I do that ?
Regards,
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
1) DLLs with resources (1 language/1 dll) - used in WndTabs - You can download its sources to see.
2) Text files with localized texts - used in Windows Commander - advantage is, the users can localize it themselfs, complications with dialogs, localized bitmaps imposible.
3) You can have multi-language resources in your aplication - the language is then selected by the OS according to local settings.
Sonork 100.15206;PavelK
|
|
|
|
|
It is relatively simple to start your app in one or another language (depending for instance on some registry value). MSDN article HOWTO: Create Localized Resource DLLs for MFC Application explains the procedure. For the language change to take effect while the program is running things are a lot messier: probably you're better off relaunching the app after setting the new language (you can even do this programmatically from the exiting instance so that the user has the illusion of having the change set on-the-fly).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
you can even do this programmatically from the exiting instance so that the user has the illusion of having the change set on-the-fly
are you saying there's a way for an app to restart itself? i've been looking for that for years...
-c
For men use, if they have an evil turn, to write it in marble:
and whoso doth us a good turn we write it in dust.
-- Sir Thomas More
|
|
|
|
|
Pardon me? Maybe we're not talking about the same issue, cause the restarting stuff is almost trivial: Get a grip to the program own name with GetModuleFileName(NULL,...) and realunch it at the end of InitInstance with, for instance, CreateProcess .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
yeah. slightly different. i need a way to relaunch after the app is really shut down (as opposed to almost shut down).
-c
For men use, if they have an evil turn, to write it in marble:
and whoso doth us a good turn we write it in dust.
-- Sir Thomas More
|
|
|
|
|
This can be done, too. At the beginning of InitInstance insert the following
HANDLE mutex=CreateMutex(NULL,FALSE,"SOME_LONGISH_AND_ALMOST_SURELY_UNIQUE_NAME_11D2_8FC2_0000E5140DA0_");
WaitForSingleObject(mutex,INFINITE);
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi.
I am working on a winsock program that supports multiple connections simultaneously. For example, the user could connection to more than one server at any given time. The design works, but it fails if the user cancels. In other words, if the user lets the program finish doing work no matter how many connections the user has selected, then the program works. However, if the user cancels via cancel button that sets a status variable in the program to false, then the program begin closing all connections and closing all worker threads.
I am still trying to fingure out what causes the program to crash. Visual C++ outputs this error.
-----
Unhandled exception at 0x77f5111b in myProgram.exe: 0xC0000008: An invalid HANDLE was specified.
-----
Does anyone know what is a good place to start debugging this kind of error? I check all thread handle via WaitForSingleObject() before closing. I use a linked list to store the threads handles.
Thanks,
Kuphryn
|
|
|
|
|
It's a good idea to check your pointers, handles, etc for validity before using them. Check all parameters that are pointers or handles before you use them. Similarly check all returned pointers or handles from functions.
Look for the line number where the error happens, and then place a break point there or step through your code and see what exactly is happening. Or you could start TRACE ing and write the output to a file. Or write automated tests that will dump the variables, thread data, etc to a file whenever an error occurs. This last approach, though painful and time consuming in the beginning, is the best in the long run, as it saves a lot of time and misery.
Regards,
Rohit Sinha
|
|
|
|
|
Most likely you're using a HANDLE that was previously closed during the cleanup process. Usually, in debug mode you just can jump right into the offending piece of code and figure out which call is causing the exception. If for some reason this is not available to you, I'd suggest you try the following: After closing a handle, set it to NULL ; then, before attempting any operation on a given handle, check for it not to be NULL : if it is, then you've spotted an error.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Okay. Thanks everyone. I know the problem and has implemented a working solution.
Joaquín M López Muñoz was right on the right track about the threads closing simultaneously. I did in fact set all threads to INVALID_HANDLE_VALUE and checked them all using WaitForSingleObject().
The problem has to do with collapsing all sockets and threads as the user cancels a process. A solution I now use is to close each socket which means all their worker threads after their threads ends and sends a messages to main frame for closing. In other words, instead of stepping through all sockets in the linked list and closing them and their worker threads, now the program waits for them to end since I am using a boolean variable to indicate cancelation. This solution works flawlessly.
Kuphryn
|
|
|
|
|
what's the difference between:
1. MBCS (Multi Byte Character Set)
2. DBCS (Double Byte Character Set - it's a subset of MBCS right?)
3. Unicode (I though Unicode IS DBCS)
any idea?
Unicode compatible API all starts with "_w"?
example:
_wXXXX(..)
thanx!
norm
|
|
|
|
|
MBCS will have either one or two bytes represent a character. When you are dealing with a MBCS you will want to be careful to use the mbc version of the c runtime functions in order to perform string operations like strlen and strncpy because you are not copying a specific number of bytes rather than characters.
DBCS uses two bytes to represent each character. That simple.
UNICODE is a DBCS, but IBM uses that term all over the place, when they refer to MBCS as well. Therefore when Microsoft refers to UNICODE as a type of character set, they use Wide Character Set (WCS).
I hope that clears things up.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
thanx, loud and clear, just one last thing:
Unicode compatible API all (or most) starts with "_w"?
example:
_wXXXX(..)
norm
|
|
|
|
|
You're a bit off with your MBCS and DBCS definitions. An MBCS uses variable numbers of bytes per character. Some will have one, some two, some three, etc. A DBCS (double-byte char set) is an MBCS with a max character length of 2 bytes.
Unicode is technically not an MBCS because all characters are the same length, 2 bytes. It is a wide character set.
--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
can someone please tell me
how to add external dependencies folder to the project?
and How to add .h files to that external dependencies folder?
thanks
|
|
|
|