FTP Transactions Using Microsoft Visual C++ 6 - c

Is there any tutorial about FTP transactions(like download, upload and files/directory listings) using Microsoft Visual C++ 6 using C language instead of C++?

You basically want a WinInet FTP client, which is the Win32 API for this kind of thing. You can do all this in straight C.
There's a decent writeup here:
http://www.teksoftco.com/articles/ftp%20client.htm
but the gist is: you use InternetOpen/InternetConnect to get a connection, then use FtpOpenFile/FtpGetFile/FtpPutFile etc. There are FtpFindFirstFile/NextFile to enumerate directories, and other methods for interrogating your current directory, deleting files, etc.

Related

using libcurl to create a standalone site-polling program

I am creating a standalone (no DLLs) windows C/C++ program that uses HTTP POST to periodically send data to an HTTP server. I identified libCURL as the HTTP client library as it seems simple and reliable.
I still need to identify the environment (an IDE) which I can use to develop my project. My program has:
poller- which checks the status of the connection
a file writer when polled link is down
a component which POSTs the file when link is up
What is the appropriate IDE for this project? I heard endorsements for DevC++ and Visual C.
I am a newb to coding and this site. Pardon me if I am unclear in anything.
Any IDE will fit your need. Just install one of them and start coding.
Try CodeBlocks. It is light, more easy to work with and has more features than Dev C++.

what is the win32 alternative to the Unix daemon() subroutine?

I have to call several (> 10) .exe command line programs in the background.
Creating a Windows Services doesn't sound very appealling in this context - c'mon, that's a bit overpowered for such a simple task.
Is there anything like a daemon(3) subroutine for Windows?
You might look into using the srvany.exe service wrapper found in the Windows Server 2003 Resource Kit Tools. I have used this method quite successfully under Windows XP, but I cannot comment on how it may work for newer versions of the OS.
There seems to be plenty of information available1 on how to use this tool.
1 - Google search for srvany+howto

How can I programmatically create PowerPoint presentations. On Linux. For Free.

I'd like to create a PowerPoint (not Javascript/HTML/PDF/Keynote/.mov) using code (any language, C preferred) for free.
(I've seen this SO question which references how to create them in C#)
Is this even possible? How can I write the raw bits that make up a PowerPoint file? Any good libraries for doing this?
UPDATE The Microsoft Reference Page for the binary format is here.
Open Office has an API. You can use the C++ bindings (doc available here). If you really need C, you'll have to do some wrapping.. but hey, it's Christmas, isn't it ;-)
Open Office has export functions to create .ppt compatible files.
PowerPoint you may not, but OpenOffice Impress you may. (Yoda style answer :) )
Take a look at the ODF Toolkit project. They aim to produce lots of libraries for generating this kind of content programatically.
Unless you're specifically interested in PowerPoint 2003 binary files, PowerPoint 2007 and up .PPTX files are actually a collection of XML files inside a zipped file. You can see that, by simply renaming a .pptx file to .zip and opening it.
You can create these XML files in any way you like, such as writing code to do it.
PresentationML defines the powerpoint XML documents, have a look here for example:
http://msdn.microsoft.com/en-us/openspecifications/hh295812.aspx
The standards could be found here:
http://www.ecma-international.org/publications/standards/Ecma-376.htm
If you don't mind going to Java, Apache POI provides readers and writers for most MS Office formats (up to the 2003 version anyway).

Windows Scripting: What and How to do this? Batch Files or Something else?

What I am trying to do is have some sort of script run in windows (ideally .cmd file/batch file) when double clicked it should create a short-cut menu in the start menu and set a path in the windows registry (i think thats what it is called) so that next time, for example, all I have to is get the variable JAVA_HOME to get the path I need.
What I need help in this is just examples on how to do these, what tutorials I should look at or even what key terms to search in Google (seriously) as I am very new to windows programming and what's used for what etc.
Thanks all
If you want to target all versions of Windows, your best choice is writing a MS-DOS Batch file (.bat). Here's a good tutorial that I've used in the past.
If you are targeting modern versions of Windows (Windows XP SP2/2003/Vista/7) you should definitely take a look at Windows PowerShell, which is the new standard automation engine for the Windows platform.PowerShell is a separate download for Windows XP SP2, Windows Server 2003 and Windows Vista, while it is included in Windows Server 2008 and Windows 7.
About Windows PowerShell
PowerShell is built on top of the .NET Framework and consists of a runtime environment, a scripting language and an interactive console.Here are some of its key features that I find most valuable:
All processing is done using CLR objects, instead of text as in traditional shells
It is possible to interact directly with the classes in the .NET Framework
It is possible to run commands written in any .NET language and distributed as DLLs (called Cmdlets)
Great collection of built-in commands to accomplish most administrative tasks
The scripting language's syntax is C-style (curly braces...)
The runtime can be hosted inside any managed process as an ad-hoc automation engine
This isn't of course a complete list of all the features in PowerShell. If you are interested, I recommend you to look into it. Here is a good place to start.

Microsoft word Text Parser in "C"

I would like to know the procedure to adopt to parse and obtain text content from Microsoft word (.doc and .docx) documents . programming language used should be plain "C" (should be gcc).
Are there any libraries that already do this job,
extension : can i use the same procedure to parse text from Microsoft power point files also ?
Microsoft Word documents are an enormous beast - you definitely don't want to be writing this code yourself. Look into using an existing free Word library such as antiword or wvWare.
I don't know about libraries that exist, but the format specifications are available from Microsoft for free and under a promise not to sue you for using them.
on windows, let word do the job and interface with the COM object, on linux, the job was done in antiword. Or you can automate OpenOffice.org on any platform with the UNO object model.
If you're willing to go through the effort of using a COM interface in C, you can use the IFilter interface built into every version of Windows since Windows 2000. You can use it to extract text from any office document (Word, Excel, etc.), PDF file or any file type that has IFilter support installed.
I wrote a blog post about it a few years back. It's all C++, but you can use COM objects from C.

Resources