|
What function are you using to do the downloading?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
For download you can use of URLDownloadToFile function did you use of it?
|
|
|
|
|
Hi,
I have capture the handle of running application.How can i minimise the application through application handle.
I used EnumProcesses(),EnumProcessModules() function.
|
|
|
|
|
pther wrote: through application handle.
What do you mean by this ? Do you mean window handle ?
If yes, what is problem using ShowWindow ?
Prasad
MS MVP - VC++
|
|
|
|
|
Send WS_MINIMIZE to that program.
|
|
|
|
|
I created a procedure:
procedure MyProc1(v_Ref_Comp_Id out abc.REF_COMP_ID%type)
is
begin
select ref_comp_id into v_Ref_Comp_Id from abc where ATTRIBUTE_ID = 1;
DBMS_OUTPUT.PUT_LINE('The value is::'||to_char(v_Ref_Comp_Id));
end myproc1;
Now i want to execute this procedure using ADO connection in VC++.I am trying like this-
::CoInitialize(NULL);
HRESULT hRes = pConn.CreateInstance((__uuidof(ADODB::Connection)));
HRESULT hResult;
try
{
if( TRUE != pConn->State == ADODB::adStateOpen )
{
strConn = "Provider=OraOLEDB.Oracle;User ID=ct;Password=matakali;Data Source=rcctrl;";
hResult = pConn->Open(strConn.AllocSysString (),"","",ADODB::adConnectUnspecified);
if(hResult != 0)
return false;
pComm.CreateInstance((__uuidof(ADODB::Command)));
pComm->ActiveConnection=pConn;
ADODB::_RecordsetPtr pRs;
pRs.CreateInstance((__uuidof(ADODB::Recordset)));
int nVal;
pComm->CommandText = "EXECUTE MYPROC1(nVal)";
pComm->Execute();//How can i retrive value in nVal
}
}
catch(_com_error &e)
{
_bstr_t bstrSource(e.Source());
_bstr_t bstrDescription(e.Description());
_bstr_t bstrError(e.Error());
CString err_msg;
err_msg.Format("Error : %ld\nDescription : %s\nSource : %s",
(LPCSTR)bstrError,(LPCSTR)bstrDescription,(LPCSTR)bstrSource );
AfxMessageBox(err_msg);
if(hResult != 0)
return false;
}
catch(CMemoryException *e)
{
e->ReportError(MB_OK);
e->Delete();
return false;
}
Regards,
Pankaj Sachdeva
|
|
|
|
|
dear friends,
what is the difference between WTL and MFC?
when we use MFC?
when we use WTL?
please tell me...
rokini.k
|
|
|
|
|
A quick search gave me this link[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
use mfc most of the time as in always ... it's pointless to use wtl because of the lack of documentation and support.. you will find a lot more developers who will know mfc vs a few who know wtl
you can walk into any book store and find books on mfc
you can spend all your time developing in wtl only to find out you wasted time and effort when you need to bring new developer up to speed on wtl
this is my personal opinion there is nothing to stop you from using wtl for your own personal projects, but if there are going to be others working on a project pick mfc and forget about it!
the only virtues of wtl is your binary will be smaller...big deal with todays mass storage PCs and mega ram and faster CPUs!
Yours Truly, The One and Only!
|
|
|
|
|
I use MFC all the time and it sucks. I would never use it by choice in any application of substance. I like WTL much better.
Steve
|
|
|
|
|
Dude I think you scared him straight
did you see this
Yours Truly, The One and Only!
|
|
|
|
|
how does script language to use my function exposed by IDispatch?for Example:there is a function declare as: long add(long n1,long n2),the script how to call this function?
Later buggers harm more.
|
|
|
|
|
simply create your automation object and call the function!
Your methods defined in IDispatch are exposed by default, if this is not working then you're doing something wrong with your COM object, check your idl, make sure your object has been registered and that you can see the interface using the oleview tool of your registered COM object!
Yours Truly, The One and Only!
|
|
|
|
|
I have a project where I would like to remove built-in buttons from the Command Bar of Office applications using the CCommandBar object. If anyone can help it would be greatly appreciated.
|
|
|
|
|
I'm trying to use GetFileAttributes to check if a folder is read-only ( for example, when a user right-click on a folder and select Properties and change the read-only attribute )
this is what I do :
DWORD dwAttr = GetFileAttributes(sPath);
if (dwAttr==INVALID_FILE_ATTRIBUTES)
{
ASSERT( 0 );
}
if ( (dwAttr & FILE_ATTRIBUTE_DIRECTORY) )
{
if(dwAttr & FILE_ATTRIBUTE_READONLY)
{
ASSERT( 0 );
}
}
if I try on a file and it works :
CString sFileName( sPath);
sFileName+="tata.txt";
dwAttr = GetFileAttributes( sFileName );
if(dwAttr & FILE_ATTRIBUTE_READONLY)
{
ASSERT( 0 );
}
I assume I'm doing something really stupid, but I cannot see it.
Thanks.
Max.
|
|
|
|
|
|
So what's the problem? What value does dwAttr have? If there is an error, have you called GetLastError() ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
GetLastError() returns ERROR_SUCCESS
dwAttr is 0x00000010 ( FILE_ATTRIBUTE_DIRECTORY ), I would have expected the value to be 0x00000011 ( FILE_ATTRIBUTE_DIRECTORY and FILE_ATTRIBUTE_READONLY ).
Anyway, it's not an urgent issue for me or our product.
Thanks.
|
|
|
|
|
Maximilien wrote: for example, when a user right-click on a folder and select Properties and change the read-only attribute
That has no effect on my XP Professional SP 2 machine I am sending this from. Perhaps this is what Mark is talking about?
|
|
|
|
|
Same here. I can't find anything except comments about the OS ignoring this attribute and/or
using it for a different purpose.
Beats me....I've never had to worry about it
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Try using _taccess API.
int _access( const char *path, int mode );
int _waccess( const wchar_t *path, int mode );
path - File or directory path
mode - Permission setting
mode Value Checks File For
00 Existence only
02 Write permission
04 Read permission
06 Read and write permission
Regards,
Paresh.
|
|
|
|
|
that does not work either; works only for files, for folder it checks only the existence of the folder (see MSDN doc.)
|
|
|
|
|
Does anyone know the possible reason for the error message "LoadLibrary failed (xxxx.dll)- Invalid access to memory location"? I have a DLL which the same code, I built using VC++ 6.0 one month ago, registered successfully using Regsvr32.exe. Now, I rebuild the same code but when running Regsvr32 to register the newly build .dll and it failed with the message error above.
Between the one month, I installed MS Front Page 2002 and a graphic package to my PC and have ran Windows update once. I thought these might cause the error, so I uninstalled the two new programs and restored my system to the time when the DLL build register successful but the problem remains.
I have also reinstalled MSVC++ and all the other tools with no success....
My colleague, who has the same code, the same setting, can build and register the dll succesfully. If I used his .dll, I can register in my PC but not the one I build. We have the same exact code (source control) and the same copy of the .dsw and .dsp....
Any idea would be greatly appreciated.
|
|
|
|
|
Does your DLL and your colleague's DLL compare the same? If not, then they are somehow being built differently.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
We didn't compare when both was working. Now, when my build did not register, we compared, and the size is about 4k diff but we can not figure out why. We've compared every possible setting/system DLL that we can think of...
|
|
|
|