|
I am not having source code of dll and no contact with writer of that dll.
I also agree it is problem of calling convention. But what is solution for that.
I tried allmost all __cdecl,__stdcall,WINAPI, something like __forcecall (not exact)
.But it crashes after end of function.
|| ART OF LIVING ||
|
|
|
|
|
Do you have the header file for the dll? If not then how do you know the function paramaters?
|
|
|
|
|
Try calling your function using LoadLibrary and verify the results. If the problem is because of calling convention or linkage, LoadLibrary call will be successful.
I am not sure whether i am mis guiding you or not, but this is another alternative when you are stuck.
Arun Krishnan
|
|
|
|
|
Dear Friend I am not having .h file so I am loading it dynamically using LoadLibrary Only. I am having documentation of dll in which it is described the details of
each functions ,what it does and its parameters. Even dll version number is also mentioned. so no chance of Mistake of parameters.
|| ART OF LIVING ||
|
|
|
|
|
CFileStdio saptxt;<br />
saptxt.Open("temp_170807.txt",CFile::modeRead);
In the above case the file temp_170807 has to be located in the same folder as the application. How can i change it to something like "C:\My folder\temp_170807.txt"??
Also how can i make this text-file name generic ie. like "temp_*.txt"??
I m using VC++ MFC application
|
|
|
|
|
Isn't it CStdioFile?? And you can just include the path also with the file name.
saptxt.Open("C:\\My Folder\\temp.txt",CFile::modeRead);
But you can’t open a bunch of files using *, if that’s what you meant by generic file name.
"What's on your mind, if you will allow the overstatement?"
|
|
|
|
|
yashveer wrote: In the above case the file temp_170807 has to be located in the same folder as the application. How can i change it to something like "C:\My folder\temp_170807.txt"??
Err, saptxt.Open("C:\My folder\temp_170807.txt",CFile::modeRead); or am I missing something here?
|
|
|
|
|
Well thanks Swathee
i was putting single back-slash"\"
double back-slash solved the problem...thnks[ ]
but the problem of temp_*.txt still remains
what can i do to get rid of this problem??
Program doesnt take temp_*.txt
|
|
|
|
|
hi,
please mention the complete error...
also,change the line to
saptext.Open("C:\\My folder\\temp_170807.txt",CFile::modeRead);
note the slashes...
swaroop
|
|
|
|
|
What are you trying to do exactly?? you have to open files separately you can't open them in a bunch.
"What's on your mind, if you will allow the overstatement?"
|
|
|
|
|
hi swaroop
double back-slash solved that problem...
In the location C:\Myfolder i could have, lets say:
temp_170807.txt
temp_180807.txt, etc....
But only one file at a time will be present
so i need to give a generic criteria like:
C:\\My folder\\temp_*.txt
Hope you got the problem
|
|
|
|
|
i m opening only one file at a time....
only one file at any given time will be present in the folder:
C:\\My folder\\
i.e. i have either text_1000.txt or text_1001.txt in that location
so i need to give something like text_*.txt
i hope its clear...
|
|
|
|
|
better u don use the multiple selection like this, use a CFileDialog class for that purpose, refer MSDN
swaroop
|
|
|
|
|
I guess you will have to find the file name at runtime and then read it?!!
There is a class called CFileFind MFC, you can use that,
<br />
CFileFind finder;<br />
finder.FindFile("C:\\Design Docs\\temp*.txt");
<br />
finder.FindNextFile();
<br />
CString filename = finder.GetFilePath();
<br />
finder.Close();<br />
Hope this solves your problem. Happy weekend.
"What's on your mind, if you will allow the overstatement?"
|
|
|
|
|
actullay by giving * wont solve ur problem, os else wat u can do is , if the file name ends with constant increase like temp_001, temp_002, etc just put the file open in a loop , concat the file name with the count (eg001,002) and open it and use it, don forget to close before u leave the loop
swaroop
|
|
|
|
|
Thank you very much Swathee
It solved my problem
Happy weekend
|
|
|
|
|
I suggest studying up on the concept of absolute vs. relative paths.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hey friends..
CDC::Arc/CDC::Pie are not supported in Windows CE..
I have tried to draw Arc using simple for loop and x = cos(Angle) * radius...
and then CDC::SetPixel used to Glow it...
but
there is Aliasing problem...
Is there any efficient Algorith to Draw Arc/Pie
Thanks in advance...
|
|
|
|
|
It's going to involve some math... But can you use CDC::Ellipse, and CDC::SetClipRegion with a triangle to make the arc, and then just draw the sides of the Pie using plain old lines?
(and yes, I'm too lazy to do the math / code here!)
Iain.
|
|
|
|
|
Hi!
I having a bit of trouble with drawing an arc and I hope somebody
here could give me a hint.
What I want is to draw an arc given the following parameters: a
bounding box (x1,y1,x2,y2) and a start- and end-angle.
The center point of the arc is the same as the center point of
the bounding box, and the start- and end-angle determines how
long the arc should be.
In example, a square bounding box and a start-angle of 0 and end-
angle of 360 will give a perfect circle (the inscribed circle of
the bounding box), while a "squashed" box and angles of 110 - 200
will give a quarter of an equally squashed circle (starting at 110
degrees).
Moreover, I would like to draw filled arcs (like a pie slice)
as well.
Can anybody give me a hint or an algorithm to look at? I've looked
at the normal Bresenham circle algo and think it should be possible
to adapt this, but I've been unsuccessfull so far.
WinCE Does not support MFC's ARC/Pie .
|
|
|
|
|
Hello,
I have created 2 windows with styles
WS_VISIBLE | WS_CHILD | WS_BORDER |WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_THICKFRAME |WS_OVERLAPPEDWINDOW | WS_VSCROLL | WS_HSCROLL.
When I maximize one window the child window gets merged with the mainframe window and now I can neither minimize this window nor can I see other windows. The restore icon is missing with this window.
What kind of styles should I include or exclude from the above styles of is there any coding involved?
Thanks
Prithaa
|
|
|
|
|
hi
Refer to MSDN before making a dialog window as child,remove the WS_CHILD it will work for now..
swaroop
|
|
|
|
|
If I remember, there was a setting somewhere to prevent stepping into template classes while debugging. ie. If I dereference a vector iterator while passing it to a method, I want to be able to hit F11 and step directly into the method, not the dereferencing.
Could anybody jog my memory?
|
|
|
|
|
I have see this in someones tip here[^]
|
|
|
|
|
Hello Friends,
can anybody tell me how to convert wchar to plcwstr. and how to use OutputDebugString() fun to print other datatypes such as int
|
|
|
|