|
Hi,
I'm trying to use Embedded VC++ 3.0, with the Pocket Pc Emulator, I can generate a typical Hello World application, and it goes fine but...
I want to download a file to the emulator and read it, I have used the "remote file viewer", it seems that the file is copied where I want, but when I'm going to read the file from my application, it gives me one error, like "it doesn't exists", should I write the full path from my computer, or the pocket Pc one ?
Another problem, comes with the S309PictureBox, I need to display a jpg image on my application, but it's impossible to register that OCX... any clue, or alternative way of doing that ?
I have tried to install EVC++ 4.0... but I get no connection with the emulator (((
Thanks in advance for your help, greetings
Braulio
|
|
|
|
|
Hi,
I need to use CoInitializeEx. It's definition is in objbase.h, and wrapped in a preproc directive...
#if (_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM) // DCOM
I cannot find info in _WIN32_WINNT anywhere in MSDN, or on this site. Am I meant to define this manually myself? Or it it defined elsewhere?
Thanks
Jon
Signature space for rent. Apply by email to....
|
|
|
|
|
You define it yourself to specify which version of winnt you are targeting.
0x0400 = NT4
0x0500 = W2k
0x0501 = XP
PS: I think it defaults to the WINVER setting
...if you're under 8 or younger. Chris Maunder, the Lounge
|
|
|
|
|
This is a macro used to target your app for specific platforms depending on the value. By default, Win NT 3.51 is targeted. If you want to target a version of NT greater than that, you need to define it.
_WIN32_WINNT = 0x0400 => NT 4
_WIN32_WINNT = 0x0500 => Win2k
_WIN32_WINNT = 0x0600 => Win XP (??? not sure here)
You can define the value in StdAfx.h, or at the top of the file which includes the required header file. But then you'll have to remember which files you defined them, and remember to update each of them if your target platform changes, so it's better to do it in StdAfx.h.
Regards,
Rohit Sinha
|
|
|
|
|
hey, is there an easy way to get the text of a CSting into the clipboard? I cant seem to find a way. Or is it more envolved?
thanks
luke.
|
|
|
|
|
Easy only in VB.
Look at MSDN[^] for a C/C++ solution. (see the samples)
...if you're under 8 or younger. Chris Maunder, the Lounge
|
|
|
|
|
CSharedFile sf(GMEM_MOVEABLE | GMEM_SHARE | GMEM_ZEROINIT);
sf.Write(sString, strlen(sString));
if (sf.GetLength() > 0) {
OpenClipboard(AfxGetMainWnd()->GetSafeHwnd());
EmptyClipboard();
#ifdef _UNICODE
SetClipboardData(CF_UNICODETEXT, sf.Detach());
#else
SetClipboardData(CF_TEXT, sf.Detach());
#endif
CloseClipboard();
}
_____________________
"So in the interests of survival, they trained themselves to be agreeing machines instead of thinking machines. All their minds had to do was to discover what other people were thinking, and then they thought that, too."
Breakfast of Champions, Kurt Vonnegut
|
|
|
|
|
thanks heaps
luke.
|
|
|
|
|
What programming tools do you use? MFC makes working with clipboard very easy.
Kuphryn
|
|
|
|
|
I'm using LoadLibrary and GetProcAddress to pull a function from a DLL. This is working okay but when I call the function, I get this from the Debug Library:
"The value of ESP was not properly saved across a function call. This is usually a result of a calling function declared with one calling convention with a function pointer declared with a different calling convention."
Now I know this means that I'm using the wrong definition for my function pointer. Unfortunately, I don't know what the exact definition should be (and the person who can tell me is on holiday!).
I know that it's two strings in and an integer return. I've tried:
typedef int (*FUNCPTR1) (LPSTR Key, LPSTR Licensee);
typedef int (*FUNCPTR1) (LPCSTR Key, LPCSTR Licensee);
neither of which work.
So does anyone have any idea how I can extract the correct definition from the DLL?
Paul
|
|
|
|
|
|
Isn't __cdecl for in the DLL? I know it's being exported with the right name.
Where would I put __cdecl in the calling program?
Paul
|
|
|
|
|
In dll
void _stdcall aa(){};
In app
void(_stdcall* )() tmp = GetProcAddress(..);
i think above will pass
|
|
|
|
|
If I try any variation on this theme, I get "Syntax Error : ')'" on the closing parenthesis after _stdcall*
Paul
|
|
|
|
|
i'm sorry , should like this
void(_stdcall* tmp)() = GetProcAddress(..);
OR
typedef void(_stdcall* funType)();
funType tmp = GetProcAddress(..);
|
|
|
|
|
That's the answer I'm looking for. Thanks, that works great!
Paul
|
|
|
|
|
The fastest solution to this problem is by removing the "/GZ" from the "Project Options" listbox
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hmmm... yeah, I guess so. Unfortunately, I was using the debug version because the release version wasn't working properly either.
The problem I have is that I'm writing custom actions for Windows Installer DLLs; sometimes these call other DLLs from SUPPORTDIR because the Installshield wrapper for standard DLLs is really poor.
Unfortunately because we have many users who run Silent Installs, we have to be able to run the DLL without any visible output. So I have a release version that's simply forcing the installer into Rollback and a Debug version that gives me all the right message boxes but then crashes like this.
It's all kind of tacky but what can you do?
All sorted now anyway, just a missing _stdcall.
Paul
|
|
|
|
|
My vc6 always creates a project as a debug version. Is there a way to change the default to release version?
I've already looked inside tools->customize and tools->options but I can't find it.
using: [VISUAL STUDIO 6.0] [WIN98/2]
|
|
|
|
|
Nope. You are expected to get rid of all bugs before release
...if you're under 8 or younger. Chris Maunder, the Lounge
|
|
|
|
|
Me never mistaking makes! Me is name Billy Gaytes...
using: [VISUAL STUDIO 6.0] [WIN98/2]
|
|
|
|
|
Bill G. makes mistakes. But Bill S. doesnt
...if you're under 8 or younger. Chris Maunder, the Lounge
|
|
|
|
|
Who's Bill S??
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
search for Bill S in the lounge if you dare
...if you're under 8 or younger. Chris Maunder, the Lounge
|
|
|
|
|
Sorry i asked, didnt mean to bring u bad memory indeed
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|