- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I have been trying to write a Fortran program that will communicate with a PDA running Windows CE. The PDA is synchronised with my desktop running Windows XP. For this to work I need to use a number of the CE* functions, such as CeFindFirstFile, CeFindNextFile, etc. While I can get these functions to work using some bad C++ programming, I really need them to work in Fortran, but they will not because I do not know how to pass to them the Unicode character strings they need as arguments. (At least I think that's what the problem is.)
This does not work in Fortran:
character(512) wildpath
wildpath = '\\Windows\\Programs\\WQA\\*.*'//char(0)
hFindFile = CeFindFirstFile(wildpath,loc(WFDFile))
But this does work in C++
wchar_t wildpath[256]
wcscat(wildpath,L"\\Windows\\Programs\\WQA\\*.*");
hFindFile = CeFindFirstFile(wildpath,(LPCE_FIND_DATA) &WFDFile);
I am reluctant to believe there is something that C++ can do that Fortran 90/95 cannot. Please can someone enlighten me.
With many thanks
Mike
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
michaelgreen wrote:If your character string MYSTRING is, say, 20 characters long, then define an INTEGER(2) buffer to receive the wide string and make it more than 2*(20+1) bytes long:Thanks for the reply.
Unfortunately I can't get the program to compile when using MultiByteToWideChar because its 5th argument must be a wide character string, and that's just what I don't seem to have access to in Fortran. The question therefore boils down to: how does one declare a wide character string in Fortran?
Many thanks
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page