|
whats the function to make a copy of file in C run-time libraries
9ine
|
|
|
|
|
you have to read the original file, create a new one, and write inside it what you copied from 1st file....
the functions you can use are fopen() , fread() , fscanf() , fwrite() , fprintf() , fclose() ...
also, see fstream if you have any chance to code in C++...
|
|
|
|
|
no, no there should be functions similar to CopyFile from windows or not?
9ine
|
|
|
|
|
hey, you asked from the C-runtime, not Win32 API
if so, then NO, there's no "copyFile"-like function in the C runtime.
then, what's your need exactly ?
|
|
|
|
|
just make a copy of the file
then use CopyFile() from winAPI
9ine
|
|
|
|
|
9ine wrote:
whats the function to make a copy of file in C run-time libraries
copyfile
"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
Support CRY- Child Re
|
|
|
|
|
Hi all,
I could able to call function of one MFC Dll from another MFC DLL.But I
want to know how to call a MFC DLL inside a Win32 DLL. I Should get the
Return value from MFC DLL Back to Win32 dll.
MY Scenario is Like this
Actually I am writing a DB code in MFC DLL, I need to get return value
from this MFC dll to a Win32 DLL i,e I should call MFC DLL inside win32
DLL and get the return value back to Win32.
The function which i used in MFC dll is derived from CDialog.
reply early...
Try again and again,
At last you will say
I don't know the meaning for impossible.,.
|
|
|
|
|
I was wandering if someone could help me to solve this problem:
I created a C++ win32 application and I need to distribute it over a network,
I made an installer for it and I have my MSI package, at this point everything is ok, because I can deploy my app over the network and, using an unmanaged installation, I have my app installed and I have written in the Windows registry so that the app starts after login...
But then to run the app I need to reboot all the computers...
Does anyone know a way to automatically run my application after install?
I cannot made it work... I find many suggestions, no one worked, but I think it schould not be difficult, I just don't find it or I do not understand how to do it!
Thank you for your help and excuse me for my poor english.
Nicola.
|
|
|
|
|
You can use
WinExec( LPCSTR lpCmdLine, // command line
UINT uCmdShow ); // window style
to run your application.
rgds
aneesh
|
|
|
|
|
Ok, but where should I put this piece of code?
Should I build a DLL, and than run from a Custom Action in the Installer?
How do I pass dynamic parameters as the path of the app that I know only during installation?
I read about VBScripts that I can launch as Custom Action but I don't understand how to pass parameters.
Thank you for your help,
Nicola.
|
|
|
|
|
nico4 wrote: Ok, but where should I put this piece of code?
At the point in which you want the other application to start.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
I'm trying to connect with a HTTPS site and download its content. Unfortunately I stuck and I have got a problem that I cannot deal with. I still get an Invalid Certificate Authority Error although I used the code presented in: http://support.microsoft.com/default.aspx?scid=KB;en-us;q182888.
I really hope that someone will help me.
The full code that I'm using:
<br />
CInternetSession session;<br />
CHttpConnection* pServer = NULL;<br />
CHttpFile* pFile = NULL;<br />
<br />
session.SetOption(INTERNET_OPTION_CONNECT_TIMEOUT, 1,000 * 20);<br />
session.SetOption(INTERNET_OPTION_CONNECT_BACKOFF, 1000);<br />
session.SetOption(INTERNET_OPTION_CONNECT_RETRIES, 1);<br />
<br />
CHttpConnection* pConnection = session.GetHttpConnection("www.site.com",INTERNET_FLAG_SECURE|SECURITY_FLAG_IGNORE_UNKNOWN_CA|INTERNET_FLAG_IGNORE_C<br />
ERT_DATE_INVALID|INTERNET_FLAG_IGNORE_CERT_CN_INVALID,443,"login","password");<br />
pFile = pConnection->OpenRequest(CHttpConnection::HTTP_VERB_GET,"/",<br />
NULL, 1, NULL, NULL,INTERNET_FLAG_EXISTING_CONNECT|<br />
INTERNET_FLAG_RELOAD|<br />
INTERNET_FLAG_NO_CACHE_WRITE|<br />
INTERNET_FLAG_SECURE|<br />
INTERNET_FLAG_IGNORE_CERT_DATE_INVALID|<br />
INTERNET_FLAG_IGNORE_CERT_CN_INVALID|SECURITY_FLAG_IGNORE_UNKNOWN_CA|SECURITY_IN<br />
TERNET_MASK|SECURITY_SET_MASK);<br />
DWORD dwError;<br />
again:<br />
if (!HttpSendRequest(pFile,NULL,NULL,NULL,NULL))<br />
dwError = GetLastError ();<br />
<br />
if (dwError == ERROR_INTERNET_INVALID_CA)<br />
{<br />
DWORD dwFlags;<br />
DWORD dwBuffLen = sizeof(dwFlags);<br />
<br />
InternetQueryOption (pFile, INTERNET_OPTION_SECURITY_FLAGS,<br />
(LPVOID)&dwFlags, &dwBuffLen);<br />
<br />
dwFlags |= SECURITY_FLAG_IGNORE_UNKNOWN_CA;<br />
InternetSetOption (pFile, INTERNET_OPTION_SECURITY_FLAGS,<br />
&dwFlags, sizeof (dwFlags) );<br />
goto again;<br />
}<br />
<br />
CString out;<br />
TCHAR sz[1024];<br />
while (pFile->ReadString(sz, 1023))<br />
{<br />
out+=sz;<br />
}<br />
pFile->Close();<br />
CTestDlg::m_plik.SetWindowText(out);<br />
-- modified at 4:34 Thursday 27th July, 2006
|
|
|
|
|
Hi all,
i am working with MFC(VC++ 6.0).In my application i needed to disable a perticular item in a listbox when double clicking on it.Please help me and give some code also
Thanks
|
|
|
|
|
Vinod Moorkkan wrote: needed to disable a perticular item in a listbox when double clicking on it
It is not possible to make an item Disable. How do u except the disable item to behave? By disabling u mean that item should not get selected by mouse or keyboard ?
nave
|
|
|
|
|
if you dont need to this item why you add this item to your listbox
|
|
|
|
|
I want to write an equation solver, Like Microsoft Student Graphing Calculator(Equation Solving tab).
I wanna solve equations like this :
4.x = 2.x + 2
Can anybody give me some sample code, or any suggestion
Thank you
|
|
|
|
|
Hum, that's not an easy task. You'll need to parse the string first. A parser example can be found in this[^] article.
|
|
|
|
|
I've written my parser already, but I don't have any idea how to solve an equation.In equation there is no value for X variable.
|
|
|
|
|
IMHO, you would have to parse the string and put the elements on to a stack.
I did this sometime back so can't remember exactly but this is the logic that I used.
If you get an operand pop one element from the stack .
If you get an operator pop two elements from the stack , perform the operation and again put the result on the stack . Go on doing the same operation until the stack is empty
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
How can I run a stored procedure(SQL Server 2005) with parameters read from a dialog in VC6.0 ++ standard edition?
-- modified at 3:56 Thursday 27th July, 2006
|
|
|
|
|
Can u explain a little more?
nave
|
|
|
|
|
Naveen R wrote: Can u explain a little more?
I have a SQL Server database in which I have a table containing name fields, data fields. I have a menu item wich says: filter by date, the menu opens a dialog in which u can select the day, month, hour.... I want to create a stored procedure to take these parameters and perform the filter for me.
|
|
|
|
|
Use catsets.cpp/h provided my microsoft.
Also There are some extension classes available in Code project it self.
"http://www.codeproject.com/database/myrecordset.asp"
|
|
|
|
|
1. I can't understand the meanning of the parameters in function DrawIndexPrimitive & DrawIndexPrimitiveUp &SetIndices. Could someone Illustrate me witch some very clearly example.
2. I dont understand format of texture with format DXTn.
I always get error when i try to access directly to it data.
For example:
For(y = 0; y < Height; y++){
memcpy((char *) lockedrect.pBit + y* lockecrect.pPitch,
mydata,
Width * sizeinbyteofpixel)
}
I dont known sizeinbyteofpixel is, i try with 1 and get error.
Someone tell me how i compute sizeinbyteofpixel.
And tell me why i alway get error.
Because i don't understand format of compressed texture.
I'm very thanks if some one tell me some good DirectX book to download ( free, i'm not have credit card to buy).
Or I'm very happy if someone share me with your favorite book
Thanks
|
|
|
|