|
Hi Guys,
Could anyone tell me how to wrap an activex control and have it as a "nice" .NET control? I know about AxImp.exe and the RCW, but they are not what I really want. I would like to know how Microsoft wraps the TreeView, ListView or the other controls, so that the types of all the properties and methods are like as if they were native types.
The classes that eg. the TreeView control uses are native .NET classes, but I don't understand how types, such as TreeViewNode converted to some native type that the activex control uses.
I tried to use Reflector to see what's going on behind the scenes, but apart from some SendMessage() calls, I couldn't find anything.
Answers are most welcome.
Tamas
|
|
|
|
|
Hi everyone,
My question is how to copy files from one computer to another through local network?
I want to copy files from my visual C++ program to another computer through local network. I knew I can use socket to make clint and server program to do that. But for my case on the clint side do not do anything just to receive files. Can anyone tell me any simplest way to do that?
Thank you.
|
|
|
|
|
Share a folder from the remote machine?
|
|
|
|
|
To make a share folder is no problem but if the program running on 50 computer at the same time and all need copy files to this remote machine can this be done?
Do I use this remote machine's name to do the copy? and How?
Thank you.
|
|
|
|
|
Take a look at the documentation for CopyFile() and CopyFileEx() in the Platform SDK. You would use "\\computer-name\path\filename" for the destination (the path would be the folder share name).
Steve
|
|
|
|
|
Hey,
I have a SDI application with a simple view class. This class use a non modal dialog (the dialoge is as large as the viewwindow) to receive user inputs. Now I need a solution to prevent resizing when main window is smaller then the dialog (width).
many thanks for helping me
|
|
|
|
|
See WM_SIZING or WM_GETMINMAXINFO .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
but how can I set a minimum width (e.g. when cx has a minimum size of 1024px not more resizing is allowed).
I used WM_SIZE before in order to move the dialog...
|
|
|
|
|
|
Hello,
Somebody can help me in my client/server applicationme because i want to get the user of the session of windows, but i know in the client and i can send to the server,but i dont know how can the server can know the window's user?, Existes something to the server to know the window's user of the client when the client stablish a communication with the server sending the IP, port,...
Or better, somebody know how can i get the window's user of one computer but without the function GetUserName?.
Thanks a lot
Hej.
|
|
|
|
|
look for NET* prefix functions!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi world,
My question is simple:
How can I write file with a sequencial access type?
I want this to accelerate the writing bandwidth of my HD.
With a litle application (not open source) I obtain:
- For a random writing access, my HD bandwidth is 5 MB/sec
- For a sequencial writing access, 15 MB/sec
Thanks for all answers...
Hello World!!!
from Raphaël
|
|
|
|
|
|
Thanks a lot for this solution... I will test that now...
Hello World!!!
from Raphaël
|
|
|
|
|
Is there a way my app can get the path of files dropped from it?
Example... The user drags the file "test.txt" from my app into windows explorer... can I retrieve the path the file was dropped into?
I'm using OnBegindragFilelistbox function to begin the drag process and a COleDataSource to implement the procedure.
Thanks in advance.
|
|
|
|
|
Use SHChangeNotifyRegister a window for retrieve all Events and all entries, and DoDragDrop a unique tmp file, then when the window retrieve SHCNE_CREATE, if the filepath inclue the unique tmp file, then the path is your request.
|
|
|
|
|
Hi all,
I am getting problems with my code in Release mode.because this one works in debug mode.
I had read all the articles here and even then i'm unable to solve my problem.
Always my application crahses after I reach this function in release version.
func(start,&count,&ipbytes,0,&returnbuff,compid)
here :
start value starts from 0 and go on increments
count is always 1
ipbytes will receive some data and I initialized it with 0 inside the function
returnbuffer also receives some data to store.
id is also a constant value.
My program in release version crashes at this function and says "Access Violation:Integer divide by zero".But no problem in debug mode.
I gave all the values in the function as 1(ie non-zero).Even then i am getting the same problem.
Can anyone suggest me the solution?
|
|
|
|
|
Look around for buffer overrun/underrun problems. Allocation is padded in DEBUG builds and sometimes hide these kinds of problems.
You can also "manually pad" your local and class-instance variables by putting small buffers around them. If things work after adding the buffers, you likely have an overrun/underrun problem.
From:
<br />
int iVal;<br />
double dVal;<br />
char caSomeBuffer[ 16 ];<br />
To:
<br />
BYTE btaBuffer1[ 64 ];<br />
int iVal;<br />
BYTE btaBuffer2[ 64 ];<br />
double dVal;<br />
BYTE btaBuffer3[ 64 ];<br />
char caSomeBuffer[ 16 ];<br />
BYTE btaBuffer4[ 64 ];<br />
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Thanx for ur reply,but I didnt understood ur idea.
And also i will specify my function in detail.
func(long,long*,long*,long,char***,long)
and I think it may not be a problem with buffer as if i give count value to zero,the code passes thru this function in release mode,But as per the logic of this function the count value must be 1.
Thanx in advance.
Regards
|
|
|
|
|
Anytime you are handling a non-const pointer to something, you are likely dealing with a buffer (or buffers). This even goes for pointers to native types like long s, where the address of a long variable is basically a pointer to its internal storage (AKA, a buffer). Thing of dereferencing as a way of getting you "indirect access" to the internal storage via the type's native capabilities.
Giving it a count of zero and not getting a problem makes it sound more a buffer-handling problem; I take it that if you pass zero, no real activity takes place in the function, so nothing really gets written to any buffers. No writes, no buffer overrun or underruns.
How is the char*** parameter handled in the function? I would start with making sure that parameter is both being created correctly before being passed in to the function, and making sure that the function is handling it correctly.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
This entire code was written by someone and I'm debugging it and succesful with debug mode.
Unfortunately I dont have source code for that function,as the function comes from an Application I installed.I just add its headerfile in my program.
Actually the application takes care of that buffer.
I just declare it as a global variable in my program.
char*** buffer=NULL;
Strangely,my compiler gives the following error when i declare it as char***(as per the function needs char***)
'function' : 'char *** ' differs in levels of indirection from 'char **** '
It works fine in Debug mode iff i declare it as char** and pass it as
func(sf,&fc,&byt,0,&buffer,id);
and code doesnt work even in debug mode if i declare as char***.
and code doesnt work in release mode whether i declare it as char** or char***
I hope u understood my problem.
Regards.
|
|
|
|
|
prgr wrote:
I had read all the articles here...
Including this one?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I need to get a IStream interface from a file.
Is it possible?
I got a function ParseData( IStream* pStream ) . But data is huge and is located in a file.
So if I could open a file and get a IStream from it somehow it would be great. But how do it do that ?
I think I need a CFile like class that also have the IStream interface to it or something.
Anyone got something like that ?
/Mathias S.
|
|
|
|
|
Something like ::OpenStreamOnFile(...) ?
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
How could I have missed that? I been searching like crazy.
And after search for the one you gave me I also found SHCreateStreamOnFile that is even better.
Thanks !
/Mathias S.
|
|
|
|