Click here to Skip to main content
15,921,716 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
Hockey22-Nov-02 18:12
Hockey22-Nov-02 18:12 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
valikac22-Nov-02 18:29
valikac22-Nov-02 18:29 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
Michael Dunn22-Nov-02 19:23
sitebuilderMichael Dunn22-Nov-02 19:23 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
Michael P Butler23-Nov-02 2:10
Michael P Butler23-Nov-02 2:10 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
Gary R. Wheeler23-Nov-02 2:58
Gary R. Wheeler23-Nov-02 2:58 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
valikac23-Nov-02 5:49
valikac23-Nov-02 5:49 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
loic28-Nov-02 1:52
loic28-Nov-02 1:52 
GeneralCOM+fopen - relative path Vs Absolute path Pin
devvvy22-Nov-02 16:57
devvvy22-Nov-02 16:57 
I am having a problem that I can't seem to figure out. I wrote a COM server that does file i/o in c++. When I tested my code outside the COM server as a standalone app, it correctly performed all file i/o. However, when the same code is packaged inside a COM server, even though I specify an absolute path: C:\my_file.txt, in an fopen() call, it writes to a file that is in the same folder as the VB client executable.

It wouldn't be such a problem, except now I want to call the code in IIS4, and I have no idea where to put my files.


i've built this COM server. From within this COM Server, I called fopen to do read/write. I have two options:
(a) relative path: I expect the file to be in the same directory of the client if its a VB client. If the client is an ASP app and I am using IIS4, then it should be in the same folder as "inetinfo.exe"?? Is this understanding correct?

(b) absolute path: It doesn't matter whether the client is a VB client or an ASP application, it should be located in the directory specified: "C:\myfile.txt".

My code inside the COM server is:

FILE * pFile;
pFile = fopen ("C:\myfile.txt","wt"); //Or I can use relative path.

if (pFile!=NULL)
{
fputs ("fopen example",pFile);
fclose (pFile);
}


Note: There're two type of client:
(a) ASP application + IIS
(b) VB Client

Thanks!



norm
GeneralRe: COM+fopen - relative path Vs Absolute path Pin
Anders Molin23-Nov-02 0:45
professionalAnders Molin23-Nov-02 0:45 
Generalmemory slot and installed memory size/type Pin
JimBello22-Nov-02 14:18
JimBello22-Nov-02 14:18 
GeneralRe: memory slot and installed memory size/type Pin
alex.barylski22-Nov-02 18:24
alex.barylski22-Nov-02 18:24 
General'diff' algorithm Pin
moliate22-Nov-02 12:43
moliate22-Nov-02 12:43 
GeneralRe: 'diff' algorithm Pin
Shog922-Nov-02 13:05
sitebuilderShog922-Nov-02 13:05 
GeneralRe: 'diff' algorithm Pin
moliate22-Nov-02 15:29
moliate22-Nov-02 15:29 
GeneralRe: 'diff' algorithm Pin
Scott H. Settlemier23-Nov-02 6:32
Scott H. Settlemier23-Nov-02 6:32 
GeneralRe: 'diff' algorithm Pin
moliate25-Nov-02 8:58
moliate25-Nov-02 8:58 
Generalextracting dialog box to use in other program Pin
IrishSonic22-Nov-02 13:36
IrishSonic22-Nov-02 13:36 
GeneralRe: extracting dialog box to use in other program Pin
Christian Graus22-Nov-02 14:01
protectorChristian Graus22-Nov-02 14:01 
GeneralRe: extracting dialog box to use in other program Pin
IrishSonic22-Nov-02 14:12
IrishSonic22-Nov-02 14:12 
GeneralRe: extracting dialog box to use in other program Pin
Christian Graus22-Nov-02 14:14
protectorChristian Graus22-Nov-02 14:14 
GeneralRe: extracting dialog box to use in other program Pin
IrishSonic23-Nov-02 5:37
IrishSonic23-Nov-02 5:37 
GeneralFolder Selection Dialog Pin
Dov Sherman22-Nov-02 11:06
Dov Sherman22-Nov-02 11:06 
GeneralRe: Folder Selection Dialog Pin
Alvaro Mendez22-Nov-02 11:25
Alvaro Mendez22-Nov-02 11:25 
GeneralRe: Folder Selection Dialog Pin
Dov Sherman22-Nov-02 12:50
Dov Sherman22-Nov-02 12:50 
GeneralRe: Folder Selection Dialog Pin
Alvaro Mendez22-Nov-02 14:30
Alvaro Mendez22-Nov-02 14:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.