|
The unicode implementation is FillConsoleOutputCharacterW().
|
|
|
|
|
And the ANSI implementation is FillConsoleOutputCharacterA(), both of which are mapped accordingly depending if UNICODE is defined. So how does this relate to my question?
|
|
|
|
|
Brain fart, my apologies.
|
|
|
|
|
Hello 2 everyone interested!
I have installed Visual Studio 2005 8 in D:\Program Files\ and WM SDK 5.0 in C:\Program Files\.
The WM5 SDK comes with a few samples, and I've chosen the bluetooth one, named BTSeach (I've seen it between codeproject's articles, too). I've launched it from the default directory:
C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\CPP\Win32\Bluetooth
When I compile it i get 2 errors, and I didn`t modify anything (anyway it's an linking error, so I guess the filepaths aren't correctly set). The output is:
------ Build started: Project: btsearch, Configuration: Debug Windows Mobile 5.0 Pocket PC SDK (ARMV4I) ------
Linking...
btsearch.obj : error LNK2001: unresolved external symbol __GSHandlerCheck
Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\Debug/btsearch.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\CPP\Win32\Bluetooth\btsearch\Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\Debug\BuildLog.htm"
btsearch - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Does any of you know where I should write the paths for files which should resolve this linking issues?
Thank you a lot!
Shpid3r
|
|
|
|
|
Did you add the SDK path to Visual Studio?
Tools > Options > Projects and Solutions > VC++ Directories
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
I`re solved this problem, and I`d like to post here, to help one who gets stuck in the same spot.
The problem seems to be the Service Pack 1 update. This is a known issue, and on microsoft site ( http://support.microsoft.com/kb/928957/ ) it`s posted this:
Error LNK2019: unresolved external symbol __GSHandlerCheck
Samples in both the Windows Mobile 5.0 SDK for Pocket PC and the Windows Mobile 5.0 SDK for Smartphone are affected by this issue.
Visual Studio 2005 SP1 updates the Visual Studio compilers with the /GS support that is already available in Windows CE 6.0 compilers. Link errors will occur in native C++ Smart Device projects that do not explicitly link to "libcmt.lib" or that have turned off /GS, and that are running on pre-Windows Embedded CE 6.0 platforms.
To resolve this issue:
1. Explicitly include "libcmt.lib" in the list of additional libraries to link against.
2. Turn off the linker warning (/nowarn:4099)
I didn`t actually manage to do this, but I've done something else. I`ve basically searched my WM5 SDK for 'libcmt.lib' (found around 7 results) and picked the one addressing the platform I was writing code for (that is AVRM4I). And simply added it to my project (add file to project > existing file). The warn doesn`t bother me.
---------
To more projects to u all
|
|
|
|
|
Can you help me.
Help to be going to create Virtual IP using "iphlp" libarary raise just there is example code using c++
wait for your advice.
thank you.
ps : thanks is add "iphlp" library fils(iphlp.h , iphlp.dll ...)
|
|
|
|
|
It is been quite a while. I have a task to identify a calling Windows' batch script's name and its location. Basically, the batch script calls/spawns my C++ executable as a parent process and I failed to identify the parent. I can identify a number of different calling processes using NtQueryInformationProcess(), but failed to do so to the batch script. The main reason is that the batch process is shown as cmd.exe not a real script name.
Thanks a lot for the help.
|
|
|
|
|
Hi,
I'm trying to print the name of the function I'm in for a trace routine that displays the name of the source file and perhaps the function name.
Is there a built in MACRO that already does that?
Thanks.
|
|
|
|
|
Like2Byte wrote: Is there a built in MACRO that already does that?
I don't know. Maybe they hide that information in the documentation[^] like usual
|
|
|
|
|
It's always one keyword away. Thanks. I wasn't using the word 'Predefined' in my search - I did look, though.
Thanks again.
|
|
|
|
|
__FILE__
__FUNCTION__
http://msdn2.microsoft.com/en-us/library/b0084kay(VS.71).aspx[^]
...cmk
The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack
|
|
|
|
|
|
in my app i use this line:
SetIcon(AfxGetApp()->LoadIcon(IDI_NEW_ICON), TRUE);
IDI_NEW_ICON is name of the icon listed in the resource editor.
|
|
|
|
|
Thanks
Best Regards,
Mushq
Mushtaque Ahmed Nizamani
Software Engineer
Ultimus Pakistan
|
|
|
|
|
I want to use SetWaitableTimer() to wake up system.
I use the following code :
<br />
void SetTimer()<br />
{<br />
HANDLE hTimer = NULL;<br />
LARGE_INTEGER liDueTime;<br />
__int64 qwDueTime;<br />
<br />
hTimer = CreateWaitableTimer(NULL, TRUE, "C&E RC WaitableTimer");<br />
<br />
SYSTEMTIME stStartTime<br />
CTime StartTime<br />
currentTime.GetAsSystemTime(st);<br />
<br />
CTimeSpan tsOneDay(0, 0, 1, 0);<br />
<br />
time = time + tsOneDay;<br />
time.GetAsSystemTime(stStartTime);<br />
<br />
FILETIME filetime;<br />
<br />
SystemTimeToFileTime(&stStartTime, &filetime);<br />
<br />
liDueTime.LowPart = filetime.dwLowDateTime;<br />
liDueTime.HighPart = filetime.dwHighDateTime;<br />
<br />
SetWaitableTimer(hTimer, &liDueTime, 0, NULL, NULL, TRUE);
}
I would like to specify absolute time, but it doesn' work !
The absolute time in this example is one minute from current time.
-- modified at 19:49 Tuesday 4th September, 2007
|
|
|
|
|
peteryenyen wrote: but it doesn' work !
That's not specific and your code won't compile so of course it doesn't work.
|
|
|
|
|
I modify the code. Please take a look at it.
|
|
|
|
|
peteryenyen wrote: I modify the code.
If you can't post code that compiles you have lower odds of receiving help because if it doesn't compile of course it doesn't work.
|
|
|
|
|
This has to be in a faq somewhere, but data is eluding me... when I create a dialog, and the messages begin to flow into the message pump... when is CWnd guaranteed to be good?
Charlie Gilley
Will program for food...
Whoever said children were cheaper by the dozen... lied.
Overheard in a cubicle: "A project is just a bug under development."
Seeking to rise above the intelligence of a one eared rabbit...
Caught in a vortex of weirdness...
|
|
|
|
|
charlieg wrote: when is CWnd guaranteed to be good?
When it's window handle is "valid" or IsWindow(...) which of course happens after CreateWindow and before DestroyWindow. Also you must be accessing the object from the same thread it was created in since MFC uses TLS to maintain CWnd/HWND data (there are technotes on this). There are ways to create temporary valid CWnd objects in worker threads but you need to know what you are doing when using that technique.
|
|
|
|
|
sigh Mike, let me be more specific. Given I need to create a window that is parented by another window. I actually need to do this with an activeX control, but I think the point is valid. And, thankfully, we're single threaded for this question.
I create my object that contains my first window. The constructor fires, and messages begin to be delivered. Eventually, a WM_PAINT arrives and some basic drawing code fills in the visual portion of the window. Things quiet down after the initial burst of events. Somewhere in that initial burst of events, the window for the object is actually valid, and IsWindow goes true.
Is it after WM_CREATE? WM_PAINT? Something in win32 or mfc sets that field....
Charlie Gilley
Will program for food...
Whoever said children were cheaper by the dozen... lied.
Overheard in a cubicle: "A project is just a bug under development."
Seeking to rise above the intelligence of a one eared rabbit...
Caught in a vortex of weirdness...
|
|
|
|
|
charlieg wrote: I actually need to do this with an activeX control
That is a whole different question. My Visual ActiveX experiences are few and old.
|
|
|
|
|
Is there a published list of Windows events and the order they occur in? I've not been able to find one, which may mean I've overlooked something obvious. For example, I want to know every windows message that occurs when a simple dialog application launches and displays. Another example - I create an activeX control, I want to know each and every message that is sent to the control as it "activates".
Spy or the version mentioned on Winspector might provide a starting list, but I'm looking for something blessed by Microsoft.
Charlie Gilley
Will program for food...
Whoever said children were cheaper by the dozen... lied.
Overheard in a cubicle: "A project is just a bug under development."
Seeking to rise above the intelligence of a one eared rabbit...
Caught in a vortex of weirdness...
|
|
|
|
|
charlieg wrote: I create an activeX control, I want to know each and every message that is sent to the control as it "activates".
There's a tool called 'ActiveX control test container' that will be installed as part of your Visual studio. Find it in start menu under vs tools.
For messages, I've learned them during development. I think this is basic Win32 programming or windows programming that you are looking for. Such things should be described in books about win32, or about windows in MSDN and I don't know a good exact source.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|