CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: xikspan

Page 1 of 4 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    1
    Views
    1,353

    MFC Text File Reading & Writing

    Is it possible to open a file only once, use it for reading from it and writing to it? I have used the .Open and then the modeWrite and modeRead separately, but am currently closing the file and...
  2. Replies
    11
    Views
    3,162

    Re: VC++ Creating Directories

    I guess because I had a brain-fart. Linking it to: "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSKD\Lib\dbghelp.lib" still gives the error:

    MapTextConverter error LNK2019:...
  3. Replies
    11
    Views
    3,162

    Re: VC++ Creating Directories

    I tried linking the library to C:\windows\system32\dbghelp.dll, but get the following error:

    MapTextConverter error LNK2019: unresolved external symbol __imp__MakeSureDirectoryPathExists@4...
  4. Replies
    11
    Views
    3,162

    Re: VC++ Creating Directories

    Thanks. I am not sure exactly where to do that. (?)
  5. Replies
    11
    Views
    3,162

    Re: VC++ Creating Directories

    Errors received after including Dbghelp.h:

    MapTextConverter error LNK2019: unresolved external symbol __imp__MakeSureDirectoryPathExists@4 referenced in function "public: class...
  6. Replies
    11
    Views
    3,162

    Re: VC++ Creating Directories

    Thanks. Does this require Dbghelp.h to be included?
  7. Replies
    11
    Views
    3,162

    VC++ Creating Directories

    I am needing to create a directory to move files into. What is the best way in Visual C++ 2003 to create a directory?
  8. Re: Access Variable or Function from Parent Object

    Alin, thanks. It is a huge application. I did have the lot.h already included. I have actually created a new constructor passing the log class a pointer to the lot class and this seems to work. ...
  9. Re: Access Variable or Function from Parent Object

    When doing that I receive errors stating first that there is an ; missing from prior to the m_cls (for me I used m_lot) and then I receive other error stating "missing storage-class or type...
  10. Re: Access Variable or Function from Parent Object

    Thanks. Yes, the GetLotLogExt() is declared as a public function, and the variable is public but it is also in a different class (Maps.cpp) that Lot.cpp instantiates to put data into memory. How...
  11. Access Variable or Function from Parent Object

    I am on a VC++ project after being away from it for 2 years, so please bear with me.

    I have a class that inherits another class for logging only. Within that Log class it needs a value from a...
  12. Replies
    6
    Views
    1,823

    Re: Clean Up Pointers? Memory Leak...

    Deleting pMap is what I found and tested, it did resolve the leak. I added:



    delete pMap;
    pMap=NULL:


    I put the ". . . . . . . " in there instead of adding a long list of text that I was...
  13. Replies
    6
    Views
    1,823

    Re: Clean Up Pointers? Memory Leak...

    I have looked through the other functions, also. The original code I sent had a pointer to the below CLot class and function, which in it points to the next one below which is the CMap class and...
  14. Replies
    6
    Views
    1,823

    Clean Up Pointers? Memory Leak...

    I have a memory leak and trying to figure out how to clean up any pointers that are left hanging when an object is destroyed. Below is a sample pointer used in a while loop that needs to be removed,...
  15. Replies
    23
    Views
    3,382

    Re: File Time Check and Write in Log

    Thanks, had to change Runtime Library setting to Multi-Thread from Single-Thread, and then it compiled without errors.

    With the code I listed above, I am getting a timestamp of 19:08:01 when the...
  16. Replies
    23
    Views
    3,382

    Re: File Time Check and Write in Log

    Below is the external link error. Thanks for the pointer on the SeekToBegin, I just wanted to make sure the file was overwritten each time. Also, is it okay to have all my code in the InitInstance?...
  17. Replies
    23
    Views
    3,382

    Re: File Time Check and Write in Log

    Below is my final code, the application compiles well in Debug, but I get external link errors in Release compile. This is with Visual Studio 6.0 or Visual Studio 2003. My main concern is that I...
  18. Replies
    23
    Views
    3,382

    Re: File Time Check and Write in Log

    Thanks! I've learned several ways to do various things lately.

    I am needing to be able to run this program every 4 minutes. How would you suggest I do this? Do I need to add a loop, timer, or...
  19. Replies
    23
    Views
    3,382

    Re: File Time Check and Write in Log

    Nevermind, got it:




    CString m_computerName = getenv("COMPUTERNAME");
  20. Replies
    23
    Views
    3,382

    Re: File Time Check and Write in Log

    Thanks.

    How would I go about getting the pc name (ex. P3302)?



    CString commFilePath;
    commFilePath = "C:\\logcomm.P3302";

    // Get the specified file information by using GetFileAttributesEx
  21. Replies
    23
    Views
    3,382

    Re: File Time Check and Write in Log

    Thanks, I changed the way I did this to use CStdioFile and it works much better:


    // Create a new text file
    CString writeHdr;
    CString writeDate;
    CString writeTime;
    CStdioFile...
  22. Replies
    23
    Views
    3,382

    Re: File Time Check and Write in Log

    I'm having a difficult time trying to get this to write out:

    WIN32_FILE_ATTRIBUTE_DATA wfad={0};
    ::GetFileAttributesEx("C:\\comm.txt",GetFileExInfoStandard,&wfad);

    SYSTEMTIME st={0};...
  23. Replies
    23
    Views
    3,382

    Re: File Time Check and Write in Log

    Thanks! That pulled it together. I had spent the afternoon trying to get it to work, and retrieved it, but had not converted it. Thanks again!
  24. Replies
    23
    Views
    3,382

    Re: File Time Check and Write in Log

    I tried the following, but it is not getting the file time. I do feel GetFileAttributesEx may be better, but do not know how to use it:

    HANDLE hFile = NULL;

    FILETIME ftCreate, ftAccess,...
  25. Replies
    23
    Views
    3,382

    Re: File Time Check and Write in Log

    Thanks for the suggestions. No, it is not a copying that is needed, just to check the filetime and maybe check it against the system time, then if it has been longer than 6 minutes or so, write it...
Results 1 to 25 of 78
Page 1 of 4 1 2 3 4





Click Here to Expand Forum to Full Width

Featured