|
If using MFC - you can try CArchiveStream declared in afxpriv2.h (create CFile, create CArchive on it and then CArchiveStream). But the implementation is not full. One of the major methods, Stat , is not implemented.
Otherwise, AFAIK, you have to implement it manually...
BTW, the question is very interesting. If anyone knows whether a system contains a ready-to-use function that returns IStream* on a file path, please tell!
One always gets the deserved.
|
|
|
|
|
|
Hi,
I want to do performance test using Rational Test Manager.
My application under test uses CORBA for remote calls.
I can not record any script.
Should I install some specific DLLs to record CORBA calls?
If yes where can I find these DLLs?
Thanks very much.
The best regards.
|
|
|
|
|
Dear Members
my problem is capturing image from webcam and send it to the remote system.Now i capture the image using Windows Multimedia API.But i dont have a idea about how to send it to network.please give tips.
By
S.Arul Joseph
|
|
|
|
|
Arul Joseph wrote:
But i dont have a idea about how to send it to network.please give tips.
Try this Link :-
http://www.codeproject.com/internet/videochat.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
You can also send it via RTP. There are libraries on the net that may help you.
Don't try it, just do it!
|
|
|
|
|
i want to capture the driver of my webcam using vc++.how can i do that.waiting for reply.
|
|
|
|
|
|
hello,
Is there any class in MFC or any custom made class using MFC, which i can use to write and read from my USB HID Device. (Important: Read and Write Report should be fail safe).
Thanks
|
|
|
|
|
Mr. Alok I read an article about USB com 5 access. Can you help me with that. my question is in previous thread post.
Thanks a lot.
|
|
|
|
|
karmendra_js wrote:
I read an article about USB com 5 access.
Which Article..... Any links.....
karmendra_js wrote:
Can you help me with that
Will try .........
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
This is from your "45 Day Series: CodeProject VC++ Forum Q&A - I"
http://www.codeproject.com/cpp/cppfaq10dec04-23jan05.asp#q103
I couldn't make out much from it how to go bout to right device drivers for my HID USB device. I had written a device driver using MFC, but it is not fail safe, means when i write to device or read from device sometimes the system hang. because write and read are blocking calls and unless they return system doesn't proceed. That should i do?
Thanks,
|
|
|
|
|
Hi,
I am trying to specify an exit code of a dialog-based MFC application. One way I have found is to directly set the m_msgCur.wParam of the CWinApp class.
For example
BOOL CImportArinApp::InitInstance()
{
m_msgCur.wParam = 2;
return FALSE;
}
Is there a better way to specify the exit code of a dialog-based MFC application?
Thanks,
Sravan
|
|
|
|
|
What about EndDialog(..) function
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I don't know if this is the right thing to do but I tried OnDialog::OnCancel before and it worked.
Comments are welcome
|
|
|
|
|
benjnp wrote:
I tried OnDialog::OnCancel before and it worked.
Yeap it will work and CDialog::OnOk() Work tooo ...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi Sravan,
CWinApp::ExitInstance
virtual int ExitInstance( );
Return Value
The application's exit code; 0 indicates no errors, and values greater than 0 indicate an error. This value is used as the return value from WinMain.
Regards
Achim Klein
We can do no great things, only small things with great love. - Mother Theresa
|
|
|
|
|
How can I have multiple zoom in one view ? an object in CView with a zoom fact and another with its zoom fact?
|
|
|
|
|
Hi everybody. I have a problem. I have a file mapped in memory, and a pointer to section of that file, and i need to read n bytes from the file in memory begining in the pointer. If anybody can helpme i will be gratefull.
|
|
|
|
|
If the file's memory mapped, then you treat it exactly like memory - so 'reading n bytes' from the file is simply a memcpy(). If you want to emulate file-like behaviour, try something like (untested code!):
const char* gFileBase = address at the beginning of your memory mapped file;
size_t gFileSize = size of the file that was memory mapped;
size_t filePtr = 0;
int memfread(void* destination, size_t numBytes)
{
size_t bytesRemaining = gFileSize - filePtr;
if (numBytes > bytesRemaining)
numBytes = bytesRemaining;
memcpy(destination, gFileBase + filePtr, numBytes);
filePtr += numBytes;
return numBytes;
}
Something like that anyway - you can hopefully see how you might implement memfseek() and so forth.
Of course, ideally you'd reap the most benefits from a memory mapped file simpply by treating it pure memory. For example, if your file was an array of Foo structures:
Foo* fooArray = reinterpret_cast<Foo*>(gFileBase);
Matt Godbolt
Engineer, ProFactor Software
StyleManager project
-- modified at 7:06 Saturday 17th September, 2005
|
|
|
|
|
Create a class that has is initialized with a pointer to that section and it's size.
Every read request will increase the pointer by the amount of bytes read.
If that amount gets bigger than the section's size, the EOF is reached.
Don't try it, just do it!
|
|
|
|
|
Dear friends,
I want to call a function exposed by a DLL. For this purpose i am loading a DLL dynamically using LoadLibrary() and then calling GetProcAddress().
The name of the function i want to call is MSPeelerMain . I dont know about its parameters. Unfortunately the only example present in MSDN
is in VB where the function is declared as:
Function MSPeelerMain (ByVal sHtmlFile As String, ByVal sCmdOptions As String) As Integer
I want to call this function in C++ and as such i am declaring it as:
typedef int (*MYPROC)(LPTSTR, LPTSTR)
But when my program executes i am getting run time debug error:
The value of ESP was not properly saved across the function call.
This is usually a result of calling a function declared with one calling convention with a function pointer declared in other
calling convention
Can you tell me how to solve this problem ??
Ahsan
-- modified at 0:50 Saturday 17th September, 2005
|
|
|
|
|
Does modifying the typedef to indicate stdcall calling convention help?
typedef int (__stdcall *MYPROC)(LPTSTR, LPTSTR)
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Yes it worked
Thanks a lot.
Ahsan
|
|
|
|
|