|
Add using std::fstream.
Kuphryn
|
|
|
|
|
Hi guys,
I'm implementing zmodem class which is downloaded from another site, programmer's heaven. I'm implementing that class in VB for my project work.
I'm not expert in VC++, but I'm able to convert the VC++ DLL into VC++ OCX and using that OCX in VB project. I made OCX cox, I need to use the same in PowerBuilder too.
I exposed 3 methods InitCOMM(), SendFiles(), ReceiveFiles() to use in VB.
The handle in VC++ classes for writing and reading COM port is defined as void *, and exposed them as long int.
I established the connection between 2 computers using MSCOMM control in VB, and passed the MsComm1.COMMID to the InitCOMM() method to initialize the zmodem class. Now, it gives automation error when I use Send/Receive functions, .. the vc++ WriteFile() always fails to write to COM port in I/O overlapped mode.
Can any one help me, how to get rid of this or any other solution for ZModem implementation.
thanks in advance
=========================
http://www.weilersplace.de/dl/zmodemclass.zip
===========================
Nathani,
Sr. Programmer
|
|
|
|
|
in my app, i need open files very fast.
the function CreateFile() is very slow, i.e. for a file of 10K bytes, the function needs around 10-50 ms (related to PC) to open it.
do u have idea to open files faster?
thx
includeh10
|
|
|
|
|
Well on Win32, CreateFile is about as low level as you are going to get. The speed of the open operation should not be dependant upon the size of the file, but the speed of reading the file will surely be dependant upon the file size. If you are really talking about the speed of reading files, I would suggest looking into memory mapped files. They are very very fast to read. Take a look at MapViewOfFile in the MSDN.
If you really are only concerned with the speed of the CreateFile (and not reading the file), then sorry I cannot be of any help.
Chris Richardson Terrain Software
|
|
|
|
|
u move my question to yours
includeh10
|
|
|
|
|
|
Just curious. Why do you need to open the file faster? 10 ms isn't that bad,
depending on what you are doing.(Opening for read or read/write?)
jhaga
CodeProject House, Paul Watson wrote:
...and the roar of John Simmons own personal Nascar in the garage. Meg flitting about taking photos.Chris having an heated arguement with Colin Davies and .S.Rod. over egian values. Nish manically typing *censur*. Duncan racing around after his pet *c.* Michael Martin and Bryce loudly yelling *c.* C.G. having a fit as Roger Wright loads up *c.* . Anna waving her *c.* and Deb scoffing chocolates in the corner.
...Good heavens!
|
|
|
|
|
Hello All,
I have a SDI application in MFC.
By default, all the forms/windows (including the main form/window) and all the messageboxs will use this application's name as the title(caption).
However, I want to change the default titles/captions for this application to another name. How can I do it easily?
I know I can use the SetWindowText (or some similar functions) to set each window's caption one by one. But any better way to do it? How to change the "default" caption to what I want?
Thanks a lot and have a nice day.
|
|
|
|
|
You can't use SetWindowText() with the main or child frames. Use CMainFrame::OnUpdateFrameTitle() etc.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Modify the string table in the resource file.
Example:
Change IDR_MAINFRAME to the new name.
Trust in the code Luke. Yea right!
|
|
|
|
|
Yes, thanks, that's what I want.
|
|
|
|
|
I'm trying to create a vertical rebar.
I write something like this:
my_rebar.Create(this,RBS_BANDBORDERS|CCS_VERT,WS_CHILD|WS_VISIBLE|<br />
WS_CLIPSIBLINGS|WS_CLIPCHILDREN|CBRS_LEFT);<br />
my_rebar.AddBar(&my_toolbar);
But my rebar looks very strange.
Could you help me?
|
|
|
|
|
Hi everybody!
I have an MFC problem this week at work:
I write an application dynamically linked to MFC. This application is dynamically linked to one of my DLL, which is an MFC extension DLL, so it links MFC too.
When I build the DLL : no problem as in debug mode as in release mode.
But for the application : in debug mode, no problem, but runtime crash when I use the DLL fonctions (ASSERT fault), and in release mode, the program compile well but I have linkage error for each MFC symbol in my program, because the linker says that the MFC-symbols was already defined, in my DLL.
I try so tips to avoid this message, but I fail Does somebody know how to get ride of this problem? Thanks by advance!
PS : sorry for my english!
Signed Twofy.
There's only 10 kind of people : those who know binary and the others
|
|
|
|
|
hello
i search an article on animation in the site but i don't find(animation:how to make moving an objects made with OpenGl or other,and seem to walk or just deplace).
can you steer me on one article if it have one in the site.
thank you
|
|
|
|
|
Hey,
I used to program in school but haven't in some time.
What I'm trying to do is to write a batch file that would probably be used when a user logs onto the domain and does the following:
1) scans the pc for shared folders
2) turns the shares off
thats it.
I never programmed for something that do somthing like that. I wrote software like a menu based ordering system that Subway could use for making sandwhich's
any help is appreciated
|
|
|
|
|
Try using WNetOpenEnum(..., RESOURCETYPE_DISK, ...) and WNetEnumResource().
|
|
|
|
|
Hello everybody,
Just one question.
- Does it works at all. I want have my application VC++(MFC, ATL, STL, OpenGL) on LINUX platform.
I'll appreciate any comments and suggestions about Visual MainWin.
Thanks.
Oleg
|
|
|
|
|
Go visit www.sourceforge.net and look for cross platform libraries.
Trust in the code Luke. Yea right!
|
|
|
|
|
Hello,
I have to dynamically create and remove columns in my project.
Creating them is relatively easy but what is the correct way to delete all columns?
I currently have this code:
while(1)
{
if(m_clMainView.DeleteColumn(0) == FALSE) break;
} But is this a valid method to delete all columns? It never failed but perhaps an OS doesn't assign column number 1 to column number 0 when column number 0 gets deleted?
How would you do it?
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
That'll work. You'll always have a column 0, unless there are no columns.
|
|
|
|
|
Ok, thank you
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
The while(1) is dangerous.
I would do it so :
int i=MAX_COL;
LVCOLUMN *pLVCol;
while (i>0)
{
if (m_clMainView.GetColumn(0,&pLVCol)==FALSE) break;
if(m_clMainView.DeleteColumn(0) == FALSE) break;
i--;
}
and give MAX_COL the current number of columns if you have it, or any value which will never be exceeded. That way, you will always come out of your loop, whatever happens.
~RaGE();
|
|
|
|
|
Good idea! I'll do it so.
Thank you
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
Yes, you should always write 8 lines of code when one will do. That way people will think you are earning your salary.
while(m_clMainView.DeleteColumn(0));
--------
There are 10 types of people in this world. Those who know binary and those who don't.
|
|
|
|
|
There are 10 types of people in this world. Those who know binary and those who don't.
Trust in the code Luke. Yea right!
|
|
|
|