|
you can use API named NetMessageBufferSend(...)
see detail form MSDN.
|
|
|
|
|
In my message map...
BEGIN_MESSAGE_MAP()
...
ON_WM_????
END_MESSAGE_MAP
what is the message used to tell a window to assert the OnRecieve method of a CAsyncSocket object.
|
|
|
|
|
CAsyncSocket::OnReceive() is an overridable rather than a message handler. To invoke it you could technically send WM_SOCKET_NOTIFY with the appropriate arguments. For details on how it gets called see the MFC source code for CSocket::ProcessAuxQueue() and CAsyncSocket::DoCallBack() in file SOCKCORE.CPP.
Anatoly Ivasyuk
DTLink Software http://www.dtlink.com
|
|
|
|
|
hi!
I've got a problem: I need to write a cache driver to cache some
explicitly selected files with HUGE caches. The real situation is,
that I should cache 3-4 files (each can have more GB in size, and
can be placed on local workstation, local network or internet) with
1-30 MB caches (in memory!) per file.
I tried to find some infos in the WinNT 4.0 DDK about the cache
manager, but I didn't find any (now I'm searching some MSDN CDs)
One basic idea of mine is, that actually I should intercept any
file reads (and writes) like anti virus resident guards (shields)
do, but this is only the idea... no code, no docs, so can anybody
help me?
The cache sould be completly transparent to other programs, but
there are some limitations: 1) for the beginning it's sufficient to
cache file reads, and 2) the file reads are generally sequencial
(means that is enough to have the cacheing efficient for sequiencial
file reads from the start to the end)
alex
ps. tips, websites, docs, etc. would also good, sample code would
be the best;
|
|
|
|
|
Since we're talking NT here, there isn't a reasonably priced solution I'm aware of.
I'd start by having a look at the www.ntfsd.org and www.osr.com, especially the formers mailing list archives.
The next solution I can come to think of is the file system filter driver DDK (IIRC it's "only" $5000 without any support, but that might have been the full FSDK) from Microsoft.
You'd probably have intercept those CreateFile calls and set the "don't cache" flag and then do the caching yourself for those handles.
But I'm a little at loss here what you really want to do. You mention you want to cache files even over "internet". Are you using SMB over TCP over the 'net? Tunneling? This is about the only way I can see how CreateFile would accept this kind of file access (since you mention "cache file reads" it seems to be a HANDLE from CreateFile used).
Could you please elaborate? Caching 30MB for a multi-GB file isn't that useful upon first glance.
Btw, 30MB cache isn't really huge. Using W2k WS (oh, sorry, "Pro") my system often have five times that size for cached (local) files.
|
|
|
|
|
1. actually it would be sufficient for now to handle local files and those one
local network;
2. once again: the files would be readed sequentially, so I think that a 30MB
cache per file is quite enough; on exceptions (random reads) doesn't maters the
caching performance
3. if you have some time, PLEASE send me an example of how could I do a file
caching for an intercepted handle; (this example would be really valuable, as
I have no deep knowledge about NT api / Visual C++; I'm actually a Delphi /
Database / Assembly programmer; ... and I'm only 19 years old )
4. where can I find some links to that Microsoft "file system filter driver DDK"?
thanks,
Sandor
|
|
|
|
|
Im looking for a method to jump into the print process, because I need to manipulate some printer data. The proble is, that I have to do this for EVERY APPLICATION that wants to print to a specific printer. I thought about using a hook, but I can´t find a hint about which message the StartDoc() function sends.
Any ideas ? Thanks, Markus
|
|
|
|
|
does anyone know how to set max/min size of an mdi child view?
i have a mdi application, and i want my my views to have a specific width and height...any idea?
thanks
F.Dost
|
|
|
|
|
Check the docs for WM_GETMINMAXINFO message:
"The WM_GETMINMAXINFO message is sent to a window when the size or position of the window is about to change. An application can use this message to override the window's default maximized size and position, or its default minimum or maximum tracking size."
Tomasz Sowinski
http://www.shooltz.com.pl
|
|
|
|
|
I Need a Class To Show JPG On a Dialog
Should It Be Done With CPaintDC ???
I Also Need To Show JPG Files
As Well As Resources Attached To My Project...
Help U Very Much... :
Best Regards - Yovav Gad
EMail: Yovav@SuperMain.com
Web-Site: www.SuperMain.com
|
|
|
|
|
How to add new columns to an existing excel file with DAO, ODBC or SQL?
|
|
|
|
|
I have a requirement to detect when an application is launched and to determine if the application was launched by an existing application.
For example, when you create a new mail message in Outlook, Outlook actually launches a new application to allow you to edit & send the message. I can detect that a new application has been launched but there doesn't appear to be any way of determing that the application was launched by Outlook.
Any suggestions?
|
|
|
|
|
Only undocumented solutions. MS don't provide us with documented solutions to this kind of "advanced" programming.
My "best guess" is that you'd have to hook CreateProcess. Check out e.g. winternals for possible solutions (you won't like the effort needed).
|
|
|
|
|
How do I get my application's main window to be on top?
My splash screen pops up on top of any other currently open windows.
BUT, when the appication opens its window, that always end up under all currently open windows.
I used the wizard to create the application. I've looked at SetWindowPos which appears to be
the function I need, but I'm not sure where it should be placed to induce the desired behavior.
Would a simple entry in the .rc file do it??
Can it be done at all??
TIA...
gary hasman
gfhasman@go.com
|
|
|
|
|
BringWindowToTop(...)
SetWindowPos(HWND_NOTOPMOST,...)
SetActiveWindow(...)
All have their own caveats.
|
|
|
|
|
I want to obtain the IP address off a modem device which has a fixed IP address. The modem AT commands do not give this information. When I connect it to my computer and connect via PPP, the host computer acquires the modem IP address using the Windows OS. I know this is done through the PPP protocol. Does anyone have C/C++ source code that I can use to mimic this. I don't even want to establish a connection, I just want the IP address.
Thanks,
jic
|
|
|
|
|
> I want to obtain the IP address off a modem device
> which has a fixed IP address.
You apparently don't know what IP is.
Perhaps a more polite response would be: Please study some more. Your modem doesn't get an IP. A modem is a "dumb" device (in this context) that only shuffle bytes. Wrapped on top of that is (whith some extra stuff) PPP.
IP is something your OS is providing. You should look at the RAS API to get the IP of that adapter from Win32.
|
|
|
|
|
I am not stupid!!! The device is not an ordinary modem. It is a cellular phone with a fixed IP address. I know that the IP address is passed to the host when a PPP connection is initiated. I would like to extract that address without completing the connection. Do you have source code that will enable me to extract that IP address?
|
|
|
|
|
I am seeking a library which can handle pop3-connections and e-mails with MIME attachments. The only POP3 library i found yet (by PJ Naughter) does not support file attachments.
|
|
|
|
|
Dundas TCP/IP (commercial) or mime++ (gpl'ish licence)
|
|
|
|
|
Hello!
What I want to do is get some code (pref C++) to enumerate the PCI devices in a machine and retrieve their names.. Is it possible? Can anybody point me in the right direction?
Thanks!
|
|
|
|
|
Hello,
There is a DOS based program with sourcecode at http://www.pobox.com/~ralf/files.html#RBpci.
There is a LINUX library with sourcecode at http://atrey.karlin.mff.cuni.cz/~mj/pciutils.html
Best regards
Eddy Steevens
|
|
|
|
|
> I want to [...] enumerate the PCI devices
Unless you tell in what environment you want to accomplish this it's impossible to give an answer.
|
|
|
|
|
If you are wanting to do this in Windows, check out the CONFIGMG_* api. This is the api that windows uses to run Device Manager and such. MSDN has plenty of info... check it out.
If everybody thinks alike, then somebody isn't thinking...
|
|
|
|
|
Every time I create a new file by choosing New from the context menu that appears
when right-clicking on an empty spot on the desktop, the word "new" is added to
the beginning of the file name. Is there any way to change this behavior?
Ex. When you select New>Text Document you create a text file named "New Text
Document.txt". I don't want the word "New" to appear in the file name, I just
want the file name to be "Text Document.txt".
Thanks for any suggestions.
|
|
|
|