Search:

Type: Posts; User: rohan_ak1

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. #include struct Base { unsigned...

    #include <iostream>

    struct Base {
    unsigned long a, b, c, d;
    };

    struct Derived: public Base {
    unsigned long e, f;
    };
  2. In my shared library, I have struct Base...

    In my shared library, I have



    struct Base
    {
    /* 4 unsigned long members are there here */
    }

    struct Derived : public Base
  3. g++ 3.3 version on Linux 64-bit: passing base class pointer corrupts variable data

    Hello,

    My project contains a 1) shared library 2)executable containing a static library

    The shared library has an interface used by the static library and takes as input a pointer to a base...
  4. Replies
    10
    Views
    2,115

    using the C++ delete operator

    Hello,

    I have a module as shown below:




    void FreeMemory(void *mem)
    {
    delete mem;
  5. Identifying sparse files programatically in C

    How would I identify sparse files through a C program ?I know that for a sparse file, its real size would be less than that returned by stat(). How would I get the real size ?

    Thanks
  6. Traversing directories using the NtQueryDirectoryFile()

    Hi All,

    I am trying to traverse directories using the undocumented API NtQueryDirectoryFile() to compare its performance against FindFirstFile/FindNextFile
    I have written this program:

    ...
  7. err = FindNextStreamW(file, &stream); here...

    err = FindNextStreamW(file, &stream);


    here stream is declared in the same function


    void FindAllStreams(HANDLE file)

    WIN32_FIND_STREAM_DATA stream;
  8. FindFirstStreamW() and FindNextStreamW() to get all file streams

    Hello All,

    I am using FindFirstStreamW() and FindNextStreamW() to iterate over all file streams and get the name and size.
    However, it returns on the data stream and alternate data streams and...
  9. However, the BackupRead() API would also get me...

    However, the BackupRead() API would also get me the stream information.
  10. Thanks.... How can I get them separately ?Will...

    Thanks....
    How can I get them separately ?Will the API GetFileAttributes() get these for me ?
  11. BackupRead() API and the FILE_FLAG_NO_BUFFERING flag

    Hello All,

    If a file is opened using the FILE_FLAG_NO_BUFFERING flag for un-buffered I/O with CreateFile() API, it cannot be backed up using BackupRead().

    With un-buffered I/O how can I then...
  12. Replies
    2
    Views
    3,548

    Array bounds checking

    Hi all,
    I need to include array bounds checking in the programs i write.
    With strings i use the following for bounds checking :


    char s[100];
    scanf("&#37;100s",s);


    How could I...
  13. Replies
    4
    Views
    1,519

    i am still in the process of learning C, so just...

    i am still in the process of learning C, so just tried that. I know its pointless.
  14. Replies
    4
    Views
    1,519

    Thanks for the answer :) I tried ...

    Thanks for the answer :) I tried



    printf("%d\n",sizeof(FILE));


    and got 148.
  15. Replies
    4
    Views
    1,519

    A doubt regarding FILE * pointer

    Hello everyone,

    While learning C File I/O I tried the following code :



    #include<stdio.h>

    int main()
    {
  16. setting file attributes through a C program

    Hello everyone,
    I need to change attributes of a file through a C program.I got file attributes using the stat structure.Now I need to set these attributes.What API's should I use?

    Thank you
  17. Replies
    6
    Views
    14,665

    Yes we have discuddes about mmap...

    Yes we have discuddes about mmap earlier...However I thought of trying it out just to see if it is any better as I needed to implement fast file copy.Now I think I will stick onto read/write.
  18. Replies
    6
    Views
    14,665

    I changed the code to this : #define...

    I changed the code to this :



    #define BSIZE 1048576
    .......................

    if((fps = open(source, O_RDONLY)) == -1)
    printf("error : can't open source file for reading\n");
    if((fpd...
  19. Replies
    6
    Views
    14,665

    using mmap for copying large files

    Hello everyone,
    I tried using mmap to copy very large files in the following way :



    if((fps = open(source, O_RDONLY)) == -1)
    printf("error : can't open source file for reading\n");...
  20. Replies
    1
    Views
    4,821

    using tar command in a shell script

    Hello,
    I am trying to use the tar command in a shell script to create an archive of files.The filenames are stored in another file.The file names are seperated by a whitespace and each...
  21. Replies
    25
    Views
    11,062

    I tried using O_BINARY flag but it gives an...

    I tried using O_BINARY flag but it gives an error.I guess open() opens a file directly in binary mode.

    These are my open() calls for the source and destination :


    fps=open(source,O_RDONLY);...
  22. Replies
    25
    Views
    11,062

    Thanks for all the help :)

    Thanks for all the help :)
  23. Replies
    25
    Views
    11,062

    I have checked file sizes on fedora 8 for both...

    I have checked file sizes on fedora 8 for both source and destination directories.I checked every file-size and it is the same.But the total file size is 0.1MB less.
  24. Replies
    25
    Views
    11,062

    On changing the code to : while(filesize)...

    On changing the code to :


    while(filesize)
    {
    if(filesize>BSIZE)
    {
    blocksize = BSIZE;
    }
    else
  25. Replies
    25
    Views
    11,062

    I have now set the buffer size to 1MB and removed...

    I have now set the buffer size to 1MB and removed the unwanted bzero statements...but what should I do with the problem of improper copying of binary files ( they are broken).
Results 1 to 25 of 31
Page 1 of 2 1 2