|
AFAIK, there is no way to check a whole string for valid hexadecial values, but you can make a loop and check each character one by one.
Have a look at one of the isxdigit functions.
|
|
|
|
|
Long story short: I have files that are on a windows network that went through another OS initially and have invalid windows filenames. this process of copying the file (unfortunately) does not cause an error leaving the windows machine with files it cannot open or really do anything with.
i am trying to find a way to rename these files and have hit major snags. the file system supports the file name (NTFS) but winxp does not so functions such as MoveFile fail. even the CRT function rename() fails and rightfully so, the name was invalid. this whole thing is pretty stupid considering the FindFile family of functions will return the invalid file name anyways even though the rest of the API doesn't support it.
i dont have the old DOS option but i was wondering if anyone could offer any insight on this issue. the lower level NtOpenFile() and other accompanying functions seem as though they might offer a solution but I cannot find enough documentation (hell, there is almost none) on this to know how they work, go figure.
maybe i need to be at a driver level?
at any rate, it can be done. i've seen programs that claim they are able to do it (making my own is more fun) and even windows will rename the invalid file through the context menu so something in the OS can do this. function hooks aren't telling me anything useful from the Nt funcs so hopefully someone else can.
cheers.
|
|
|
|
|
Try seeing if GetShortPathName() works. If it does, you can use the file's short name to rename it.
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 apologize for the long delay in following this up. GetShortPathName() doesn't work and fails a second requirement of a network file (seems to return NULL)
thanks for the suggestion.
|
|
|
|
|
I have used Winsock2 for my application to communicate with the device over
TCPIP socket.I get the following sequence of events .
1. The Application that runs the Client socket is alive.But after about 24
hrs. the network connectivity for the Machine is disabled.
2. On further investigation of the issue I found that in the Event viewer
the event has been noted as Event ID -2019 and the note alongside is
"The server was unable to allocate from the system nonpaged pool because the
pool was empty."
On further investigation of my code I find that the WSARECV() call that I make to receive the data bytes from the server socket is causing the memory leak of non paged bytes.
Do help out with this issue.
|
|
|
|
|
CComboboxEx::FindString is not supported.
Do I have to do the search manually?
|
|
|
|
|
Sorry for my first reply, didn't scroll down far enough in docs. I guess you'll have to either brute force it or maintain a searchable array separate from the combobox itself. Since it's ownerdrawn, don't you have to maintain the array yourself anyway? If not, why not try it that way?
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
so, I think I should use GetItem, and compare with each cbi.pszText.
|
|
|
|
|
Call GetComboBoxCtrl() to get the CComboBox object and then call FindString() on that.
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"
|
|
|
|
|
|
Does calling FindStringExact() work on that combo box?
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 also doesn't work.
I've done it by comparing item by item.
Thank you all the same.
|
|
|
|
|
followait wrote: I also doesn't work.
It should. ComboBoxEx controls definitely forward the CB_FINDSTRINGEXACT message to their child ComboBox control (see here[^])
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 m working on a web project and i want to implement the thing which is implemented in this site (codeproject) i.e when we click a message its description becomes visible and when we again click it disappers............similar to this message page
Do good and have good.
|
|
|
|
|
Hi,
I don't want to see so many files, and it is not convenient to take so many files to my friends. So how can I generate a single .exe file from several files (with extension .exe and .dll) under "Debug" directory? Of course, it must work.
it is a win32 console application.
|
|
|
|
|
have you try to generate a release version?
|
|
|
|
|
I tried just now, result is the same.
the project generate a the .exe file, but I need a dll which generate by another project to run with it, and I must set the two project output to the same outputDir.
|
|
|
|
|
Which DLLs are you linking against?
If it's the C library and the MFC library, you can change your linker <edit>settings</edit> to link to them statically, rather than dynamically.
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"
|
|
|
|
|
the dll I want to link is built by another project of the same solution.
|
|
|
|
|
The only reasonable way you can include it in your executable is to build it as a static library rather than a DLL, and link to it statically instead of dynamically.
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"
|
|
|
|
|
Do you mean I should use dllimport statements in my source?
|
|
|
|
|
Huh? No. Recompile your DLL as a static library - change its project settings to compile as a static library rather than a DLL.
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"
|
|
|
|
|
Hi All,
currently i am developing an application for audio playback, including local and online resources. I planned to use WMP SDK to help, however, one of my function needs me to be able to select/change the default audio device, however, it is not support by the SDK. I would like to know is there any other method to do so?
(just like Skype/WMP itself hae similar function)
thanks a lot~
|
|
|
|
|
You have to change the values of the following registry keys...
HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper\...
Set value for Playback
Set value for Record
Nibu thomas
Software Developer
|
|
|
|
|
Thanks for you reply, however, i use regedit and cannot locate the key you mention.... any suggestion?
thanks
|
|
|
|