|
Can you recomand for a book?
Thanks,
Reli.
|
|
|
|
|
HI ALL,
I have already created directory.I want to monior this directory, for any chages, like file copying , removing. Which method I should use?
VikramS
|
|
|
|
|
For an "easy" approach, try implementing a FileSystemWatcher object from the .Net Framework. This object has capabilities to watch for all events you specified.
Without the .Net Framework, I remember that there was a discussion over this matter earlier on the forums. You could try searching.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
|
In addition to Brian D's suggestion, also check out FindFirstChangeNotification() .
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi ALL,
I want to communicate between 2 different machines , for data transfer.Which is the best method using pipes or Sockets?
VikramS
|
|
|
|
|
As far as I know, named pipes are memory sections that allow processes running on the same computer to exchange data between each other. A socket, on the other hand, represents a connection to an external computer.
Because you are running two different machines, I would see the sockets as the only reasonable option.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Nope. Named pipes support communication with other computers too, although it depends on the OS version. I don't think W9x allows you to create a named pipe, so if you have 9x/ME as a taget, you must run with sockets.
Steve S
|
|
|
|
|
Hi, basically sockets is a portable mechanism to comunicate between process and machines boundaries over any platform, if you are programming pipes on windows it will work just on windows based networks (not for internet) and finally pipes programming are easier then sockets programming.
GuimaSun
www.nexsun.com.br
|
|
|
|
|
Is there any performance Issue?
VikramS
|
|
|
|
|
Hi,
my current project consists of a .net application (exe in VB.NET) and a VC++ DLL. Normally, I just call functions in the DLL out of my application, which works just fine. But sometimes I'd like to do it the other way round: to call functions in the .net application out of my C++- Code. Is this possible, and if so, how is it done?
Thanks a lot
mosquitooth
|
|
|
|
|
Hmm..
Considering that you can use the handle of a loaded DLL to get pointers to the exported functions inside, it would seem logical that the same procedure can be applied vice-versa.
When you load an application, you usually get an instance handle. Passing this instance handle out of the application context (thread) into a DLL's handler function (residing in another thread), should allow you to use GetProcAddress or a similar function to get the exported symbols of your .Net application.
This should be pretty easy to implement with MFC, just by using AfxGetInstanceHandle in the executable, and passing this handle over to the DLL, you can use the handle to get the exported symbols. But a case with VB .Net and VC++ DLL, I'm not sure. I don't know how you can export symbols from a VB.Net application/DLL. See the VB manual for instructions on this one.
But the outline of the procedure I mentioned should work. An additional problem may arise because the .Net application most obviously runs over the CLR, and is thus considered 'managed'. Passing a handle of a managed application to an unmanaged DLL might prove "interesting" results
All in all, try this out, and you'll see what happens..
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
I have installed Visual C++ 6.0, in Windows XP. Installation gave me some debug symbols for Windows NT, but those are too old to be installed into WinXP.
Does anyone know where to get theese symbols for WinXP ?
It seems that I need it, because when my program crashes, I can't see call stack information
Thanks !
rrrado
|
|
|
|
|
How can I change the title of the PropertyPage in a propertysheet. I mean the name of the tab. I tried with SetWindowText() but it doesn't work.
Thanks
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
Get the tabcontrol of the propertysheet and set the text of the corresponding item whose text you want to change.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
A property sheet, when ran, consists of a property sheet object (the parent), a collection of property page objects (individual dialogs) and a tab control used to switch between the pages. During the first creation stage, the tab texts are taken from the dialog template titles. Changing these pre-build will alter the tab texts.
During run-time, you can change the title by first getting the property sheet object, then asking for the tab control via GetTabCtrl . A CTabCtrl class has a method called SetItem that takes the index of the page and a TCITEM structure.
Assuming in the following example, that m_wndPropertySheet was a pointer to CPropertyPage class, this code fragment will alter the text of the first tab
CTabCtrl* m_ptrTab = m_wndPropertySheet->GetTabCtrl();<DIV>
TCITEM ti;
ti.mask = TCIF_TEXT;
ti.pszText = "New tab text";<DIV>
m_ptrTab->SetItem( 0, &ti ); Hope this will help you out. Naturally, if you are unsure where the correct page is, you can use GetItem ínstead of SetItem to get the item's text and determining the index from there...
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Hello everyone:
I have some big size text files, How to insert/delete some content of text file fastly?
Thank you
-Freehawk
|
|
|
|
|
I don't believe that there is some faster way how to insert/delete some data in the middle of the file, than moving data at the end of the file by blocks
(If you need to insert/delete blocks which size is exactly as big as size of allocation unit, you could do this by manipulating FAT/NTFS tables, but this is little but difficult
|
|
|
|
|
Thank you for the fast reply.
Is it really that there is no way to do faster?
Oh.
-Freehawk
|
|
|
|
|
You did not say how big the file is, but it is conceivable to read the file into a CString variable, make the necessary modifications, and write the CString variable back out to the file. Depending on how you want to alter the data, using a LPBYTE type instead of a CString object is also possible.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
how do you convert double to char? i mean to keep it the way it is as double for display.
exp: 3.5 will be 3.5 as char (maybe to CString or array since this is 3 characters)
|
|
|
|
|
CString str;
double dblValue = 2.25;
str.Format("%0.2f",dblValue);
Hope it helps
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
|
If you use CString to store the value, try the "format" method.
If you use char * , try to use "sprintf".
If the result will put into unicode string, try "swprintf"
Ellis Li
|
|
|
|
|
Hi,
In my application I get the recent opened file from m_pRecentFileList variable. Here is the code
CString the_File=(*m_pRecentFileList)[0];
OpenDocument(the_File);
In OpenDocument I have
pDoc->Load(CComVariant(lpszPathName));
Here it always fails.
But If I give the path directly,
ie CString the_File="c:\\text.abc"
It works fine.
Regards
Neha
|
|
|
|