Services on windows using Visual C++ 6.0 - c++

I need to create a service on windows using Visual C++ 6.0 .
I am not familier with services so I read in the msdn site.
Can someone send me likns to agood sites explaining (with example) how to create service using Visual C++ 6.0 (prefer with examples) ?

You can use ATL to build a service in VC6. Try the ATL wizard, and let it generate the service stub for you, then you can flesh it out with proper functionality.
That said, the ATL framework's service support isn't great (at least wasn't in VC6), and will give you a service that's tailored to exposing COM objects.
There's a great book on services, called Professional NT Services:
http://www.amazon.com/Professional-NT-Services-Kevin-Miller/dp/1861001304/ref=pd_sim_b_3
See if you can get it used.

Related

Call REST Service from Win32 application

I have an Win32 application which runs on the Windows server (2003 & later). My application has to call a REST service to POST some JSON data.
How can I proceed with implementation? Which library or SDK should I use to call REST service from C++ application.
Please suggest.
Thanks in advance.
I'd suggest using modern C++11 Casablanca REST API developed by Microsoft. This API is now included into Visual Studio installation package. You can also use WinHTTP API which is kind of legacy stuff. There is also MFC/ATL implementation called ATL Server that does include HTTP Client classes.

Is there any documentation on TFS Web Services?

I am looking for any information on the Microsoft TFS Web Services. First I know accessing the Microsoft TFS Web Services directly is not supported and Microsoft provides no documentation for doing this. Therefore I am not expecting any Microsoft support or assistance here.
I know all about the .Net API available for TFS which only works on Microsoft Operating Systems. I have used these many times on Windows, however I need to do non-Windows work to access TFS, I cannot use .Net and I cannot use a Proxy (or "shim") to be installed on a Windows computer to provide Web Services for the .Net API.
I know Teamprise reversed engineered the web services and they successfully used this knowledge to make a very good cross platform Team Explorer and command line implementation in Java to access TFS. So good in fact they were purchased by Microsoft and the product rebranded and rereleased as Microsoft Visual Studio Team Explorer Everywhere.
I have also tested the .Net API against Mono on several non-windows platforms and they are not compatible. The initial NTLMv2 authentication is using calls not supported by Mono. They appear to be, understandably, making Win32 specific calls for NTLMv2 support.
Therefore before I go to the trouble of reverse engineering them for myself, and dealing with NTLMv2 to do it. I am hoping that there is some hidden or buried information on the web that someone may have documented some portion of the web services for TFS from 2005, 2008 and/or 2010.
Please no comments or posts about how this is not recommended or supported by Microsoft, that I should find a way to use the .Net API, or suggesting the Proxy/Shim is the best solution. I am fully aware of the Microsoft's official stance on this, and what the supported workarounds would be.
I'm not aware of any documentation for the TFS web services, but I can share some tips on calling them.
The NTLM authentication you mention is really a separate layer: you must authenticate to IIS before it lets you call TFS web services. I'm not aware of any Open Source software that will do NTLM auth for you, but TFS 2010 makes it easy to enable "Negotiate" authentication (SPNEGO on Wikipedia, Authentication by using Kerberos Ticket on MSDN). Negotiate supports both NTLM and Kerberos subsystems, and there may be some existing software you can use to drive it using the system's Kerberos libraries (I think curl does it). If you had to build it yourself, it would probably be easier to go the Negotiate-with-Kerberos route.
Once you're authenticated, you can start calling services. Start by pulling down the WSDL for each service (stick a "?wsdl" suffix on each endpoint URI). Hop over to where TFS is installed and explore the web application directory for endpoints. There are several versions of some endpoints for back compat with TFS 2005 and 2008, but usually new versions are not redundant (they add new stuff). You might have a favorite SOAP client library already (there are many for Java), but I can't really recommend any because we wrote our own at Teamprise.
Services like version control, build, and common structure are easy to discover via WSDL. Most the operations have obvious names, but the complex type fields are often super-abbreviated. The best way to figure which methods to call when is to watch the VS TFS client or TEE with Fiddler or Wireshark or some other HTTP inspection program. TFS VC does do things like file uploads/downloads outside the web services (watch a network trace to see the multi-part MIME upload process and be sure you're sending the right values if you implement this).
A note of caution on the work item tracking web service: this one is going to be extremely hard to master. The WIT design involves the client pre-querying the server for large amounts of schema-less metadata, which is saved on the client (but refreshed incrementally as more web service calls are made). This metadata drives all the client side behavior about work items (what fields are in a work item type, the type of a field, which values are allowed in fields, the rules that run when they change, etc.) and it will take a long time and serious study to build the client behavior to bring a work item to life. Once you have a work item, sending it to the server for update via web services is easy.
It's a lot of work, but it's possible to do incrementally, for example, if you only need some VC features. The TEE team is working on making access from other platforms easier. Please contact Martin Woodward (martin.woodward#microsoft.com) if you have any questions or suggestions in this area.
There is a Java version of the TFS SDK that will run on Linux, Mac, and Windows. It is the SDK that Teamprise uses.
http://blogs.msdn.com/b/bharry/archive/2011/05/16/announcing-a-java-sdk-for-tfs.aspx
Coding directly against the TFS webservices is not supported (even though people have done it). MSFT could break the interface without letting you know in a service pack or other hotfix. Sometimes there aren't other options, but if the Java SDK works for you, I'd try to use that first.
There is good documentation now: https://www.visualstudio.com/integrate/get-started/rest/basics

Visual Basic 6 WSDL Soap Proxy

How would I go about generating Visual Basic 6 Proxy dll/tlb from a WSDL file?
Similar to the WSDL2Java for java, but for Visual Basic.
You could generate a Web Service client proxy using one of the tools available in .NET, either through Visual Studio or one of the command-line programs (wsdl.exe when using ASMX or svcutil.exe when using WCF) and make the resulting class and its containing assembly available to COM.
If you want a VB6 native solution, I believe your best choice is using the SOAP Toolkit.
Also, see this related question on SO:
What is the best way to consume a web service from VB6?

Blackberry what SDK and language are used

I am new in Blackberry. Can anyone help me out for following queries?
Which SDK is used in Blackberry?
In what language are Blackberry applications developed?
Can we call webservices through Blackberry applications?
Blackberry applications are written in Java. They support Java ME as well as some additional blackberry specific APIs. Check out http://na.blackberry.com/eng/developers/javaappdev/overview.jsp
As for calling a web service, yes you can do that as well. Check out the Rapid Application development tutorial at: http://na.blackberry.com/eng/developers/rapidappdev/
As heavyd said you can use the Rapid Application Development for accessing web services.
I've used the Visual Studio plugin before but this doesn't allow you as much access to the API as using the standard JDE plugin for Eclipse or the Blackberrys Java Development Environment (at least when I used it). It all depends on what you want to do, whether it's whip up a quick app or create a fully customised sweet looking application that'll take a little longer.
If you don't decide to go down the RAD route you can use a 3rd party library like KSOAP2, or, the way I do it, is use the Sun Wireless Toolkit (WTK) to create Stubs for you're web service methods which you can then call in your application. I've used this method for a .NET web service and it's pretty straightforward.

How to build stand-alone SOAP web services using Delphi?

How can I build a stand-alone SOAP-based Web Services using Delphi? Must work with Delphi 2009, but it'd be nice if it worked with older ones too.
The built-in WebBroker Web Services creates CGI or ISAPI. It would be nice to create a stand-alone executable that I can control from bottom to top, especially during development.
RemObjects SDK for Delphi (RO/Delphi).
Different messaging formats are
provided, including our own highly
efficient binary BinMessage format, as
well as support for SOAP, XML-RPC and
- new - JSON encoding, in case you want to make your servers accessible
to clients not using RO, or write
clients to access Web Services
provided by others.
Dave Nottage wrote Building a stand-alone Web service with Indy (source code).
This article explains how to fit Indy
into Delphi 6's Web services (SOAP)
support.
According to the comment on the page, it works with Delphi 2009 with some modification.
Edit: People in Indy 10 and IdHTTPWebBrokerBridge with CBuilder 2009 posted modified version. For example, IdHTTPWebBrokerBridge.pas is by Jochanan van der Niet.
It should be possible to build a web service with VCL for the Web (formerly: Intraweb). It has an option of creating a standalone executable that contains both: web server and web application
In D7 I used IdHTTPWebBrokerBridge (Indy 9). But i don't know if it is still available in D2009.
There are a series of SOAP articles on Dr. Bob's website and specifically there is RAD Studio 2007 XML, SOAP and Web Services Development manual, but it's 99 Euro.
Something I used in the past was idRunner which is an extension to the indy library and it allows you to develop ISAPI dll's which your application then runs. The advantage of this approach, is you can deploy a standalone application to run your soap service, that can easily be deployed via IIS at a later date.
For debugging, I strongly suggest the idDebugger on the same page. It makes debugging ISAPI applications very easy.
Here is a step-by-step solution "Delphi 7 Indy Standalone Web Services/SOAP Server" which looks like it can be useful for Delphi 2009 too:
http://www.digicoast.com/delphi_soap_standalone.html
Update:
this solutions uses IdHTTPWebBrokerBridge, it can be used in Delphi 2009 with minor changes.