|
DragAcceptFiles is basically a legacy API - this is how Windows 3.1 File Manager used to indicate a file drop onto an application.
Explorer uses the full OLE drag-and-drop protocol. See Transferring Shell Objects with Drag-and-Drop and the Clipboard[^] for some basic information and pointers on how to register for OLE drag-and-drop.
|
|
|
|
|
To start my internal net is 100mbit.
I need to read a lot of data ( couple of Gigs ) over the net very frequently.
So I need a program that copies the data and I want to go as fast as possible.
If I copy the files over FTP I get over 10MB/s in transfer speed and task manager shows network usage at 98-99% witch is really great. But I don’t want to use FTP.
I want to read the file from a network share.
And if I do, I only get like 6.5MB/sec so I made my test program to read/write threaded.
Triple buffers and read/write at the same time and stuff. And now I get like 7-7.5 MB (not much of a performance gain)
Anyway network usage only gets up to about 56-59% if I read from network share. I tried reading with different chunk sizes but did not make any difference.
If I copy the file with windows drag'n'drop I get also low speed but a little better, network usage of 62%
I understand that doing a lot of readfile(...) and stuff will generate more io request then receiving data over FTP. But should it really drop so much.
Anyone have any idea of why I can’t get close to 100% network usage when reading from a network share?
/Mathias
|
|
|
|
|
The problem depends on the design and implementation of the actual application.
Kuphryn
|
|
|
|
|
Hi.
The callback function is called when it receives some data. But it receives huge amount of data that requires a lot of time to copy. So I want to put this function to some thread. How to do this? I tried to inherit some class from CWinThread :
class MyThread : public CWinThread
{
.....
void SomeCallBack(...);
}
then MyThread m* = new MyThread; m->CreateThread();
but the thread creates and then completed. Why?
How to solwe my problem(how to create thread class that finished existence when I need)? Please, send example if it is possible.
Thankful in advance.
|
|
|
|
|
snmail wrote:
but the thread creates and then completed. Why?
Does the newly created thread do anything? Just curious, but why aren't you using AfxBeginThread() ?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
There are several solutions including AfxBeginThread() and __beginthreadex(). Post the code in the thread. I suspect that the thread callback function does nothing and just returns.
Kuphryn
|
|
|
|
|
Is there a tool/software that will parse my existing C++ classes and produce a diagram (drawing) of the class/objects hierarchy?
|
|
|
|
|
UML Studio from http://www.pragsoft.com/ is actually quite good. You are allowed to evaluate it before registering/paying too. However if I had VC7 with everything then I would use Visio.
|
|
|
|
|
Visio does, but it's not free
|
|
|
|
|
|
Absolutely! Use Doxygen - it's fast, flexible, and free! It rocks!
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I was not very clear in my first post, so let me clarify here:
Say I have 4 classes, CBiggestObj, CBigObj, CSmallObj1 and CSmallObj2 and the code looks like this:
class CBiggestObj : public CDontCare
{
CBigObj m_bigobj;
}
class CBigObj : public CWhatever
{
CSmallObj1 m_obj1;
CSmallObj2 *m_pobj2;
}
I need some software that will show me visually (with balloons and
arrows, like in a diagram) that CBiggestObj has a member CBigObj object and that CBigObj has 2 members, an object of CSmallObj1 and a pointer to a CSmallObj2. I don't need to know where the classes are inherited from.
|
|
|
|
|
Yep, Doxygen will do that for you. Be sure to install the (free) Graphviz package that draws all the pretty diagrams.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
When you say Doxygen will do that for you, do you mean without any change to the source, so it can parse C++ declarations, or do you mean after you've manually inserted comments?
I suspect the original poster wants the former, rather than the latter.
Steve S
|
|
|
|
|
Steve S wrote:
so it can parse C++ declarations,
Yep! It's tres cool!
We use it as part of our build process at work to generate class documentation (from manually inserted comments). Doxygen even generates a non-empty log file if it detects (to the best of its ability) invalid comments, which helps us keep our documentation honest.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
i can't add context help button (WS_EX_CONTEXTHELP) on dialog box because min-box and max-box buttons have been added on the dialog.
do u known how to solve the request?
(that is: there are 4 buttons - close, min-box, max-box and context buttons - totally on the top-right corner of a dialog).
thx
includeh10
|
|
|
|
|
Hi,
I have a SDI app with a scrollview derived view class, which I try to paint using GDI+. So far so good. Previously, I used "old" GDI to draw, and simply took the scrolling into account by doing such as this:
<br />
CPoint where = GetDeviceScrollPosition();<br />
Pen penn(Color(0,0,0), REAL(width));<br />
pdc->DrawRectangle( &penn, rect.left - where.x, rect.top - where.y, rect.right - rect.left - where.x, rect.bottom - rect.top - where.y);<br />
Now, it seems like two things happen when I scroll. The old "drawing" moves up, like I want it to, and the view redraws itself, without regards to scrolling. In other words, as if I haven't scrolled anything yet.
If anyone can make any sense of this, please help me out!
|
|
|
|
|
Hi!
I'm recieving a packet and saves it in my buffer. Then I will make i new line in the buffer so next packet information will be saved at a new line.
Can somebody help me please,
steve
|
|
|
|
|
styve wrote:
...saves it in my buffer.
How is the data being saved? What type is buffer ?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi
I wanted to produce a mechanism like Reflection in c++ (without using dot net framework).can i do that..? How..? Is there any framework available to achieve this mechanism?
Or simple i will provide a class name in a string to a function that function will return me a new object of that class. is it possible in simple C++ (Not using MFC or dot net). If yes please let me know also.
Thanks in advance
Ravi
|
|
|
|
|
|
What is Reflection? I have heard about it in the context of Java.
|
|
|
|
|
I am also not familiar with Reflection. However if all you want to do is to produce a new class object based on the string passed into a function, one of the factory methods would work fine. For achieving your simple aim, the Builder method or the Abstract Factory should suffice.
I believe that there are various cool methods already on CodeProject on these subjects.
|
|
|
|
|
i have written an application..MFC in VC++ to carry out PC 2 PC commn
using TAPI3.0(API's)
all the API's including Answer( ), Disconnect( ),all r wrking that is i am able to dial an IP and connect to that PC,answer a call at the other Pc,
and Hang up frm either sides..without any problem..voice is also being carried..
when i tried Hold( )to hold my call...it does not happen..or the Transfer..
there is no sample code for these and i am utterly confused..
the function does not return OK(will return this if carried out properly)
instead some error..number..is given..
Thanks for the details Michael, Let me explain in detail,
TSP is TAPI3.0
the functions r ITBasicCallControl::Hold
and ITBasicCallControl::Transfer
linehold and linetransfer are for TAPI2.0
my application is completely in TAPI3.0
and the other functions in it like..
ITBasicCallcontrol:: Answer and Connect r wrking perfectly fine..
and i have nothing to do with the modem..
cos this is for PC 2 PC communication
Pls. let me know
|
|
|
|
|