windows « windows « C File Q&A

Home
C File Q&A
1.array
2.binary
3.delete
4.Development
5.directory
6.fgets
7.fopen
8.fprintf
9.fscanf
10.fwrite
11.header
12.include
13.input
14.LINE
15.linux
16.open
17.output
18.pointer
19.read
20.size
21.string
22.struct
23.Text
24.windows
25.write
C File Q&A » windows » windows 

1. Creating big file on Windows    stackoverflow.com

I need to create big relatively big (1-8 GB) files. What is the fastest way to do so on Windows using C or C++ ? I need to create ...

2. Strategy flushing file outputs at termination    stackoverflow.com

I have an application that monitors a high-speed communication link and writes logs to a file (via standard C file IO). The response time to messages that arrive on the link ...

3. How do I apply a set of properties to a subset of files in a Visual Studio Project?    stackoverflow.com

Where I work, we have a large codebase of C code that we build using Visual Studio 2005. It's separated into a variety of projects, including several static libraries. There are ...

4. Searching files in C on Windows    stackoverflow.com

How would one search for files on a computer? Maybe looking for certain extensions. I need to iterate through all the files and examine file names. Say I wanted to find all files ...

5. C:\Program Files problem    stackoverflow.com

A configuration file needs position of another file, but that file is located in "C:\Program Files", and the path with space in it is not recognized, Is there another way to specify the location ...

6. How can I change the login info for a .mdf sql server file that had windows authentication set, if the computer no longer exists?    stackoverflow.com

At our company, we had a computer running Outlook 2007 Business Contact Manager, with all our info tied to the SQL Server database MSSmallBusiness.mdf file. Everything was fine and dandy. ...

7. Premptively getting files into Windows page cache    stackoverflow.com

I have a program written in C that allows the user to scroll through a display of about a zillion small files. Each file needs to undergo a certain amount ...

8. Handling Files greater than 2 GB in MSVC6!    stackoverflow.com

Normal file related functions like fseek, ftell etc in Windows MSVC6 can handle files only upto 2GB (As per my current understanding, Please correct me if I am wrong). I want to ...

9. How to set the modification time of a file programmatically?    stackoverflow.com

How do I set the modification time of a file programmatically? OS: Windows Programming Language: C

10. Change file owner in Windows    stackoverflow.com

Is there an API in Windows similar to Linux's chown?

11. FTP file transfer on Windows platform using ANSI C?    stackoverflow.com

I have a known shared folder on another Windows PC and i have to transfer files using my ANSI C program to that shared folder using an FTP connection. I need ...

12. EDIT Control Showing Squares Instead Of Returns    stackoverflow.com

I'm playing a little bit with PocketC by doing a simple text editor. But with this code to read and to display the contents of the file on the ...

13. Grabbing windows file information    stackoverflow.com

In C following this article (http://blogs.msdn.com/oldnewthing/archive/2006/12/21/1340571.aspx), we have succesfully been able to grab the file version information out of windows files however there are some files that seem to have a ...

14. Tool to convert .Glade (or xml) file to C source    stackoverflow.com

I am looking for tool that can convert .Glade (or xml) file to C source.
I have tried g2c (Glade To C Translator) but i am looking for windows binary. Any ...

15. On Windows XP, programmatically set Pagefile to "No Paging File" on single c: drive    stackoverflow.com

I'm trying to write a C#/.NET application that optimizes the hard drives for our XP workstations

  1. Set pagefile to "No paging file"
  2. Reboot
  3. Run a defrag utility to optimize the data and apps
  4. Create a ...

16. How to list the files in a folder in windows mobile using C?    stackoverflow.com

anyone has an idea how to?

17. Why can't I test the return code in Windows 7?    stackoverflow.com

I have a very complicated program that is failing, and I've simplified it to this test set with a batch file and C program. My C program uses ExitProcess to pass back ...

18. Is there a way to programatically remove controls from C:\Windows\downloaded program files?    stackoverflow.com

I am trying to create a tool that will perform some "clean up" functions for some non-technical Windows users. Most of the work will be unregistering dll files from previous versions ...

19. How to get the LBA ranges, given a file?    stackoverflow.com

Given a file, how can I get the LBA ranges corresponding to the file? Can FSCTL_GET_RETRIEVAL_POINTERS do the job?

20. On windows _fseeki64 does not seek to SEEK_END correctly for large files    stackoverflow.com

I have reduced the problem to the following basic function which should simply print the number of bytes in the file. When I execute it for a file of 83886080 bytes (80 MB) ...

21. shellexec and c:\program files - x86 and x64 portability    stackoverflow.com

I'm modifying an open-source GUI (written in c) to add a new menu item to the tray app. The new menu entry executes a file (update.exe) in the program root in ...

22. edit the etc\hosts file    stackoverflow.com

Using C or a bat file, I'm trying to edit the file hosts file from c:\Windows\System32\drivers\etc but I can;t bc it is write protected. Can you tell me what can i ...

23. How to get the name of a file from a file handle in Windows using C?    stackoverflow.com

I'm trying to retrieve a file name from a given file handle. I've seen that GetFileInformationByHandle could be useful, but the structure it returns does not contain any file name ...

24. help with script in windows [redirecting files to C program]    stackoverflow.com

I am trying to redirect multiple files to a C program. meaning, I have several input files [tests] and I want to run them all with one script. then write all the output ...

25. FileSystemObject moves a file even when is being copied over FTP    stackoverflow.com

I have a program that checks periodically for new files, and then process them. Because I want to be safe that the file is not being copied over FTP, I move the ...

26. how to create a file in c drive using C# in Windows7 OS    stackoverflow.com

how to create a file in c drive using C# in Windows7 OS

27. How to determine in Windows whether file exists, does not exist or this can't be known (using c)    stackoverflow.com

I have to clean up from a list of files the ones that do not exist any more. The ones whose status is indeterminable should be given a warning about but ...

28. how i can get file created date    stackoverflow.com

i want to know when a file is created.I want to know it's date when it is created Windows 7 OS

29. Count the number of lines of a file in windows C    stackoverflow.com

I have this:

#include "stdafx.h"
#include <windows.h>
#include <assert.h>




int _tmain(int argc, _TCHAR* argv[])
{
    LPCTSTR filePath = argv[1];
    DWORD numLines = _ttoi(argv[2]);

    HANDLE fileHandle = CreateFile(filePath,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_FLAG_SEQUENTIAL_SCAN,NULL);


 ...

30. Calling a batch file from a windows service    stackoverflow.com

I have a service that needs to call a batch when a new file is copied to a directory. I tried using CreateProcess, ShellExecute, ShellExecuteEx and even system. I tried calling ...

31. Does anyone know of an easy way to programatically mount a file as a "disk" (FAT32) in Windows 7?    stackoverflow.com

I have some automated test (using CUnit) which require a "disk-image"-file (raw copy of a disk) to be "mounted" in windows and explored. I have previously used a tool/library called ...

32. Convert a .c file, that was created on a Mac, to Windows    stackoverflow.com

Is there a way to convert a .c file that was created on a Mac to be compatible with VS2010? Or am I stuck having to re-type the code by hand? Thanks! ...

33. Strim a line in a text file (Windows)    stackoverflow.com

I currently have several hundred file path in lines in a txt file I need to strim e.g.

report2011510222820.html:   <td width="60%" bgcolor="#f4f4f4" class="tablebody" valign="top">C:\Users\Administrator\Desktop\calc.exe</td>
How could I take out "report2011510222820.html: ...

34. Windows 7 - Can't update my program's files in C:\Program Files    stackoverflow.com

I have an addin program that works with MS Word (version 2007). It is located in the C:\Program Files location. I installed Windows 7 and then went to make ...

35. how to cygwin tail over c:/wamp/logs/ file in Windows?    stackoverflow.com

I'm using Cygwin:

tail -f prueba.txt
The file is located in c:\cygwin\home\ (/home/). How can I do exactly the same for a file that is located in:
c:/wamp/logs/

36. Combine multiple VS2010 Projects to one .lib file    stackoverflow.com

I want to combine a number of Win32 C-Projects to one .lib file. OS: Windows XP Sp3 IDE/Comipler: Visual Studio 2010 Now I have one parent project that references all the other projects. But ...

37. Why is data not being flushed to file on process exit?    stackoverflow.com

int main(int argc, char *argv[])
{
    FILE *fp = fopen("a.txt", "wt");

    fprintf(fp, "AAAA");

    // No flush. and No close
    raise(SIGTERM);

 ...

38. Print new line to a text file without carriage return (CR) in windows    stackoverflow.com

I am writing a program in C that prints a random hexadecimal value to a text file. The printed value has a carriage return (CR) along with a line feed (LF). ...

39. createobject scripting.filesystemobject IIS 7 - vbscript code always trying to save file in C:\Windows\System32\inetsrv\ instead of web site folder    stackoverflow.com

As per title createobject scripting.filesystemobject IIS 7 - vbscript code is always trying to save file in C:\Windows\System32\inetsrv\ instead of web site folder and I get a "permission denied" error of course The ...

40. Building .c file to create driver won't work following basic example    stackoverflow.com

I'm following this basic example how to create a system driver: http://sriramk.com/blog/2007/09/world-windows-driver-from-scratch.html When I do the build I get the following (above the BUILD: lines):

0>XmlLog::File::CopyXslFile(): Unable to copy the XML style ...

41. Convert BMP file to PNG file in-memory    stackoverflow.com

Possible Duplicate:
Convert bitmap to PNG in-memory in C++ (win32)
I have a BMP file as a char* buffer. I want to convert this BMP file ...

42. How to respond requests with the windows host file?    stackoverflow.com

Using the windows host file located in

windows/system32/drivers/etc/host
Is it possible to respond a request from an application like when it is offline(not connected to the Internet)? Could you please ...

43. Can C language be used on windows files??    bytes.com

You will need to use an SDK from Microsoft for this. That is, your slide show example requires a startup iof a PowerPoint process. There is an Office SDK for this. Be prepared to address a whole host of issues (not the least of which is learning Windows programming) if you try this.

45. Segmentation fault in C program using MS-DOS and fgets under Windows after program in    bytes.com

No real point in posting huge blocks of code anyway. As a programmer, you're expected to be able to distill problems to their essences. In large blocks of code, that means figuring out the problematic section. A segfault occurs commonly on bad memory access. Use a debugger to figure out precisely where the segfault occurs, and trace the memory access in ...

46. Windows Mobile File Syste API    bytes.com

47. .zip, .rar files and basic windows xp folders source code    bytes.com

i am a newbie to computer programming having gotten visual basic 6 and borland c++ builder 6 as gifts. is it possible to view the source code (not file information) of a folder (such as a basic windows xp folder) or .zip or .rar file directly (the source code itself of the file, not the info of what files are in ...

48. How to build lib files in windows?    cboard.cprogramming.com

49. fseek() broken under Windows?    cboard.cprogramming.com

50. File creation date (in windows 98 and XP)    cboard.cprogramming.com

51. Windows Commander Split File    cboard.cprogramming.com

52. C# - Create Windows App to search Office 2007 Files    forums.devshed.com

Hey all, I need to create an app that will work similar to the Windows Search feature. Desired Results A user types in text, selects a directory, and the app searches all the files and returns the files that have the text. I was able to get that part, except now the search does not work on Office 2007 files. So ...

53. file asociation windows    forums.devshed.com

54. windres .rc file writeing help for windows    forums.devshed.com

I am lookinf for a place or some one to show me what all can go in a rc file. I mean the syntex and lexicon of the rc file. this is for windows os. I want to write my rc files by hand with dev-cpp ide. I have gone to google and tryed everything i could i just don't know ...

55. mp3 files windows    forums.devshed.com

How can i use C++ to access mp3 files and all their attributes in xp? Their are many different attributes for music files such as name, artist album etc - i would like to change these. I don't have visual studio, so will have to use win32 or standard c++ - will this be possible? cheers

56. finding files in windows...    forums.devshed.com

57. Windows Media File (wmf.h)    forums.devshed.com

60. Playing media file in Windows CE    daniweb.com

hi, I am developing an application in Windows CE platform is Windows Ce .net 4.2. i need to play media file through C code, i have managed to play media file in win32 through "system" command but this command is not available for Windows CE, i have tried CreateProcess function for Windows CE application but by this i am only able ...

61. I need to create to create video file container from scratch without using windows Vfw or direct show    codeproject.com

Simpler? Write your own codec implementing existing container and/or compression formats. :-) No, I don't. Of course it is dense. What did you expect? Please, do the following: find out formal description of just one of the video compression format and algorithm, read it thoroughly, realize how complex it is and imagine how much work would it take to implement it. ...

63. How do I share folders that my windows application create with other computers on the network and also make it possible for other computers on the ne...    codeproject.com

from MSDN: NetShareAdd The NetShareAdd function shares a server resource. Security Requirements Only members of the Administrators or Account Operators local group or those with Communication, Print, or Server operator group membership can successfully execute NetShareAdd. The Print operator can add only Printer queues. The Communication operator can add only communication-device queues. NET_API_STATUS NetShareAdd( LPWSTR servername, DWORD ...

65. Moving files and folders with a custom windows explorer    codeproject.com

"I want to" and "I'm very confused" about the same thing are incompatible, please check up you logical reasoning. My feeling you do not really want it very much; but you're being forces by something or somebody. Is this case, your chances to get any help are really low. Remember, anyone needs some motivation to help you. Who will be interested ...

67. How to make the file contents transparent on FAT/NTFS for windows.    codeproject.com

I am not sure what you mean by transparent. To prevent your data from being "sniffed" by other applications including simply opening the file isn't so easy. You can however protect your data from being able to be usable. How unusable is up to you, basically unusable, like opening a PDF in notepad, is fairly simple, save the binary ...

68. Metadata file 'C:\WINDOWS\Microsoft.NET\Framework\v2 could not be found"    bytes.com

"Metadata file 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET Files\my_proj\ce601211\9d5d0aae\App_WEB_header.asc x.asdf7d2.vcvdd1d.dll' could not be found" I'm getting this error sometimes when i'm trying to compile my web project. The weird part is that to solve it - I just keep hitting the F5 button until the error disapper and then the project is running fine. I found the problem on the web but now solution. ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.