|
I need to write ActiveX control that can retrieve product version from specified file from ftp or http server. Is there any function in MFC that can do this? Can somebody help me?
Nase.
|
|
|
|
|
Good day ALL.
Such question. I'm try to call SOAP method from NT Service about in the same way:
ISOAPClient* m_pSOAPClient;
HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
hr = CoCreateInstance ( __uuidof (SoapClient), NULL, CLSCTX_INPROC_SERVER,
__uuidof (ISOAPClient),(void**) &m_pSOAPClient );
hr = m_pSOAPClient->mssoapinit( A2BSTR( sURL ), L"", L"", L"" );
As a result of execution the last string I'm get error:
The specified module could not be found.
Funnily what not long ago it's work. But when I write similar code at MFC of console application it's work ok.
HELP ME PLEASE!!!!!!!!
|
|
|
|
|
I wanna write a small c program to record HTTP request information to a file and I am curious what precautions will I have to take?
I think basically all I will concern myself with is locking the file, writting to file and unlocking file.
The file will be simple in nature...basically append each request after the other and nothing but CSV format I guess.
Anyways, i'm not writting to a database so I don't think I need to secure data before being written to a file, cuz I can't see any way anyone can make data being sent to a file run any system commands or anything.
There will be no SQL injection hacks here
What should I concern myself with...? I wanna make this thing as small and fast as possible...so...I wanna keep it simple...
p.s- I am aware MySQL would be better, but it isn't in this situation...and I am also aware most servers like Apache...already generate log files...but I need my own...
Cheers
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
I wrote a code of WAV(C:\\InputFile.wav) to WMA(C:\\OutputFile.wma) of the audio,but it was distempered.Please give a help,thank you in advance.
The following is my code:
#include <windows.h><br />
#include <atlbase.h><br />
#include <comdef.h><br />
#include "D:\WMSDK\WMEncSDK9\include\wmencode.h"<br />
#include <conio.h>
<br />
void main()<br />
{<br />
HRESULT hr;<br />
IWMEncoder* pEncoder;<br />
IWMEncSourceGroupCollection* pSrcGrpColl;<br />
IWMEncSourceGroup* pSrcGrp;<br />
IWMEncSource* pSrc;<br />
IWMEncVideoSource* pSrcVid;<br />
IWMEncAudioSource* pSrcAud;<br />
IPropertyBag* pPropertyBag;<br />
IWMEncProfileCollection* pProColl;<br />
IWMEncProfile* pPro;<br />
IWMEncFile* pFile;<br />
IWMEncAttributes* pAttr;<br />
IWMEncDisplayInfo* pDispInfo;<br />
CComBSTR bstrName = NULL;<br />
long lCount;<br />
int i;<br />
<br />
hr = CoInitialize(NULL);<br />
if ( SUCCEEDED( hr ) )<br />
{<br />
hr = CoCreateInstance(CLSID_WMEncoder,<br />
NULL,<br />
CLSCTX_INPROC_SERVER,<br />
IID_IWMEncoder,<br />
(void**) &pEncoder);<br />
}<br />
<br />
if ( SUCCEEDED( hr ) )<br />
{<br />
hr = pEncoder->get_SourceGroupCollection(&pSrcGrpColl);<br />
}<br />
<br />
if ( SUCCEEDED( hr ) )<br />
{<br />
hr = pSrcGrpColl->Add(CComBSTR("SG_1"), &pSrcGrp);<br />
}<br />
if ( SUCCEEDED( hr ) )<br />
{<br />
hr = pSrcGrp->AddSource(WMENC_AUDIO, &pSrc);<br />
}<br />
<br />
if ( SUCCEEDED( hr ) )<br />
{<br />
hr = pSrc->QueryInterface(IID_IWMEncAudioSource, (void**)&pSrcAud);<br />
}<br />
if ( SUCCEEDED( hr ) )<br />
{<br />
hr = pSrcAud->SetInput(CComBSTR("C:\\InputFile.wav"));<br />
}<br />
<br />
if ( SUCCEEDED( hr ) )<br />
{<br />
hr = pEncoder->get_File(&pFile);<br />
}<br />
if ( SUCCEEDED( hr ) ) <br />
{<br />
hr = pFile->put_LocalFileName(CComBSTR("C:\\OutputFile.wma"));<br />
}<br />
<br />
if ( SUCCEEDED( hr ) )<br />
{<br />
hr = pSrcAud->QueryInterface(IID_IPropertyBag, (void**)&pPropertyBag);<br />
}<br />
if ( SUCCEEDED( hr ) )<br />
{<br />
hr = pEncoder->get_ProfileCollection(&pProColl);<br />
}<br />
if ( SUCCEEDED( hr ) )<br />
{<br />
hr = pProColl->get_Count(&lCount);<br />
}<br />
for (i=0; i<lCount; i++)<br />
{<br />
if ( SUCCEEDED( hr ) )<br />
{<br />
hr = pProColl->Item(i, &pPro);<br />
}<br />
if ( SUCCEEDED( hr ) )<br />
{<br />
hr = pPro->get_Name(&bstrName);<br />
}<br />
if (_wcsicmp(bstrName,CComBSTR("Windows Media Video 8 for Local Area Network (384 Kbps)"))==0)<br />
{<br />
if ( SUCCEEDED( hr ) )<br />
{<br />
hr = pSrcGrp->put_Profile(CComVariant(pPro));<br />
}<br />
break;<br />
}<br />
}<br />
<br />
if ( SUCCEEDED( hr ) )<br />
{<br />
hr = pEncoder->PrepareToEncode(VARIANT_TRUE);<br />
} <br />
if ( SUCCEEDED( hr ) )<br />
{<br />
hr = pEncoder->Start();<br />
printf("When encoding stops, press a key to close the console window.");<br />
<br />
if ( SUCCEEDED( hr ) )<br />
{<br />
while(!kbhit())<br />
_asm nop;<br />
<br />
hr = pEncoder->Stop();<br />
}<br />
}<br />
<br />
if ( pPropertyBag )<br />
{<br />
pPropertyBag->Release();<br />
pPropertyBag = NULL;<br />
}<br />
if ( pSrcGrpColl )<br />
{<br />
pSrcGrpColl->Release();<br />
pSrcGrpColl = NULL;<br />
}<br />
if ( pSrcGrp )<br />
{<br />
pSrcGrp->Release();<br />
pSrcGrp = NULL;<br />
}<br />
if ( pProColl )<br />
{<br />
pProColl->Release();<br />
pProColl = NULL;<br />
}<br />
<br />
if ( pPro )<br />
{<br />
pPro->Release();<br />
pPro = NULL;<br />
} <br />
if ( pFile )<br />
{<br />
pFile->Release();<br />
pFile = NULL;<br />
}<br />
if ( pSrcAud )<br />
{<br />
pSrcAud->Release();<br />
pSrcAud = NULL;<br />
}<br />
if ( pSrcVid )<br />
{<br />
pSrcVid->Release();<br />
pSrcVid = NULL;<br />
}<br />
if ( pSrc )<br />
{<br />
pSrc->Release();<br />
pSrc = NULL;<br />
}<br />
if ( pAttr )<br />
{<br />
pAttr->Release();<br />
pAttr = NULL;<br />
}<br />
<br />
if ( pDispInfo )<br />
{<br />
pDispInfo->Release();<br />
pDispInfo = NULL;<br />
}<br />
if ( pEncoder )<br />
{<br />
pEncoder->Release();<br />
pEncoder = NULL;<br />
}<br />
}
Rap off for you,for me,for our human.
|
|
|
|
|
I've noticed that on a couple of different installs of Visual Studio 6.0 the auto-complete stops working for some reason. It continues to work on user defined classes, just not included ones. Does anyone know how to fix this or turn it back on?
Ex:
string test;
test. //after the dot operator pop-up menu does not appear nor function definitions on open paren.
|
|
|
|
|
Can anyone suggest a way to play an Avi file over a push button control?
|
|
|
|
|
|
Hi,
Is it is possible to create a interactive thread or process from a interactive service?
With best Regards,
A.Ilamparithi
|
|
|
|
|
The book I'm reading has me create three files:
rectangle.h
- header file with #ifndef RECTANGLE_H #define RECTANGLE_H and ends with #endif .. I'm not sure what these do exactly, but it says to put them in there.
rectangle.cpp
- This one contains the member functions of the class I define in the header file, but there is no main function in it. When I try to compile it I get..
"LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main"
For the third file it tells me to link the project with the object file that's created from the rectangle.cpp file, but that file wont compile.
I'm using Visual C++ 6.0 and to make the rectangle.cpp I went to New/C++ source file.
Please help
|
|
|
|
|
oops. looks like I was hitting build instead of compile.. it put the .obj file in a folder called debug.
Now I'm trying to figure out how to link that .obj file with the third file.
|
|
|
|
|
Hi there
How to convert double to int?
Q1:
if a double is smaller than 1.4, it will be assign to 1
Ex: 1.3 will be 1
if a double is bigger than 1.4, it will be assign to 2
Ex: 1.5 will be 2
Q2:
if a double is bigger than 1 and smaller than 2, it will be assign to 2
Ex: 1.20 will be 2
2.10 will be 3
Does anyone know the function?
Thanks.
|
|
|
|
|
Can't u use a cast?
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
Q1: Add 0.5 and cast to int.
Q2: (rounding up) is done bey ceil() (and ronding down by floor()).
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
I can not find sqlcli1.h and sqlenv.h
could you help me ?
thanks
|
|
|
|
|
They are discussed in this online manual[^]. It looks like a pair of headers for developing programs to use DB2 databases. If there's a developer kit for the product, they're probably included in it.
Heard in Bullhead City - "You haven't lost your girl - you've just lost your turn..." [sigh] So true...
|
|
|
|
|
|
I'm trying to write a peice of code to allow me to intercept the close command in the console attached to my application's process so it will prompt the user before destroying the process. Below is the function I wrote for this. It works fine, but the problem is that when the message box pops up it convinces windows the program has stalled, and an end task window opens. Is there any way to prevent this? If it matters, I'm only considering Windows 2000/XP compatibility for this app.
BOOL WINAPI ConsoleHandlerRoutine(DWORD dwCtrlType)
{
int i;
switch(dwCtrlType)
{
case CTRL_C_EVENT:
case CTRL_CLOSE_EVENT:
for(i = 0; i < (MAX_DASMS - 1); i++)
{
if(dasmDialogProcInfo[i].handle)
{
if( MessageBox(hWnd_console, "All work in open windows will be lost if you terminate the application. Proceed?", "Information", MB_YESNO | MB_ICONQUESTION) == IDYES )
return FALSE;
else
return TRUE;
}
}
break;
}
return FALSE;
}
|
|
|
|
|
Hi,
I learn that Visual C++ 6.0 is not ansi/iso compatible but Visual studio .net is. Can anybody elaborate a little more on it? Why one is not and the other is?
|
|
|
|
|
It is a matter of design from Microsoft. Visual C++ .NET is simply newer and is a better C++ compiler than its predecessors.
Kuphryn
|
|
|
|
|
No compiler is actually 100% ansi/iso compatible. Ultimately VC++ 6.0 suffered from Microsoft wanting to ensure backward compatibility and that the standard was still not finalized. In the end, Microsoft responded to customer demand for fuller compatiblity. Now if we could just get them to fix all the goofiness with Visual Studio....
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Joe Woodbury wrote:
Now if we could just get them to fix all the goofiness with Visual Studio....
And goofy it is...Oh Yes!
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Joe Woodbury wrote:
No compiler is actually 100% ansi/iso compatible.
This one[^] is.
|
|
|
|
|
Hi there...
I'm using VC6 & STL in my program along with Openssl.
I'm getting compilation error in OpenSSL\bn.h
The error is as follows:-
error C2955: 'modulus' : use of class template requires template argument list
c:\program files\microsoft visual studio\vc98\include\functional(57) : see declaration of 'modulus'
There seems to be some kind of conflict in template names, because STL and OpenSSL structure are using same template name.
Is there any simple workaround for this ?
Any help is appreciated.
Sheetal.
|
|
|
|
|
Have you defined 'using namespace std;' ?
In that case, try deleting that and use the fully qualified name instead, eg. std::cout instead of cout.
Anyway, that's just a SWAG, because I rarely write C++ myself
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
Hi,
Did anybody put a CRectTracker on a CScrollView wider than client area (4000x4000 pixels for example) and do some scrolling and/or zoming? The MSDN doesn't help me at all! From my point of view the MSDN creators should explain very clear where the actual Draw-ing is made when CRectTracker::Draw function is called. It is made on client area - visible area(ex: 100x100 pixels wide) or view area (ex: 4000x4000 pixels wide)?
Why 6 is affraid of 7?
Because 7 8 9
|
|
|
|