SureshN's Q&A profile
Visual Studio 2008 (Pre-release) Using IXmlSerializable interface in the ServiceContract
Hi, I am having a problem with WriteXml writer in my custom serialization object used in the ServiceContract. I can't write my object xml representation as a first child of the <body>. The following sample shows a payload of my ServiceContract for WS-Transfer/Create where channel writer automatically inserted the Create (Action) and request (argument name) elements into the <body> which it will break the WS-Transfer specification. <s:Body> <Create xmlns="http://schemas.xmlsoap.org/ws/2004/09/transfer"> <request> <anyURI xmlns="http://schemas.m ...Show All
Visual C++ How do you create a pointer to class funcitons (not members)?
Hey, I was jsut wondering, how do you create a pointer to a function that is a member of a class Note that I don't want to make a pointer to member, I just want to be able to do something like this: class ClassA { public: void SayHello() { MessageBox(0, "Hello", "", 0); } }; int main() { ClassA a; void (*ptr)() = a.SayHello; // this would be how i would suspect it to be done ptr(); } How do I acomplish this This would work if the class function is static. The problem is that your pointer knows naothing about the object you want to use. Hopefuly I didn't made a syntax error... (the ...Show All
Visual Studio Express Editions Amazon-Enabled Movie Collection
I've downloaded the web-enabled MovieCollection and got it to run, but for some reason, it does not save any of the data. I type in movie names but as soon as I exit the program and restart it, the data is gone. What could be the problem You bet. And you're right - the project model has built in roll back functionality so the code you build is the code you ship. This feature is nice for many things like settings files and resource files, however, it's not always correct for local databases. --Paul ...Show All
.NET Development How to measure the memory pressure?
I am designing a .Net component that relies some on a quite elaborate cache system. The cache can be regenerated at any time but at great CPU/IO expense. The WeakReference is not enough my own needs because (for example) it cannot take into account the regeneration costs that may vary from a WeakReference to an other. I would like to know how the memory pressure that applies on the current process can be measured in .Net I have seen the method GC.GetTotalMemory() but the information brought by this method is partial. Do anyone has an idea to do this Thanks, Joannes I wasn't suggesting that you use .NET ...Show All
Visual Studio What does ReportViewer.LocalReport.LoadReportDefinition() actually do?
Thanks to the help of Brian at Microsoft, I no longer get the error "A data source instance has not been supplied..." however, I only get the <Header> fixed data and none of the actual data rows from the <Details> section of the RDL where its <Value>=Fields!foo.Value is used. I found ReportViewer.LocalReport.DataSources.Add() but not anything else to reference the SQL query results from the RDL report file. I gather that LoadReportDefinition() is the function that reads the RDL file to manage the display of the data but does it commit the SQL query and manage the query results What does LoadReportDefinit ...Show All
Visual Studio Team System Relationship between projects and source control
The relationship in vstfs between a project and the vstfs source control seem screwy to me, maybe I don't understand it. I have one major application and run multiple projects to upgrade different areas of the application, say three projects running concurrently. So the relationship for me is a team project with the source code sitting outside (or above) this. Vstfs seems to want me to put the source within a team project. How then do I have a separate portal as new projects come along if I'm working on the same source code This is a related topic to the relationship between source control and team projects ... I can easily ...Show All
Visual C++ LINK : fatal error LNK1104: cannot open file 'libcimtd.lib'
Hi, I've been trying to compile a code snippet and this is the first time I was using Visual Studio. I got an error while linking the objects: 1>LINK : fatal error LNK1104: cannot open file 'libcimtd.lib' I've already installed the Windows 2003 SDK without the x86_64 things, because my processor is x86. I didn't change any setting apart, VC++ directories where I added the SDKs ones. Do you know what my problem is Thanks! PS: I'm still learning how to program, so bare with me... Do you have the file on your machine Also, wha version of Visual Studio are you using Than ...Show All
Visual Studio Express Editions comctl32.dll
Hi I'm using VC++ 2005 Express Beta 2 + Platform SDK When compiling i see line : 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll', Exports loaded And i don't like it becouse it wouldn't work on computer were are no VC++ Express Beta 2 installed... Is it posable to make it use the comctl32.dll from \system32 folder Hi I got similiar problem. My program worked fine under WindowsXP SP1 and VC++ 6.0. After I upgraded to WindowsXP SP2, I got this error: Loaded 'C:\WINXP\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww ...Show All
.NET Development XmlNode in Generated Typed Class
I generated a C# (or VB.NET) class using an XSD file supplied from a Java-based web service. The schema includes a "body" element that can itself be more in-line XML as defined in a second XSD file (or in others). The generated class declares this body element as an XmlNode rather than an object. Why isn't the body element declared as an object like the other XML elements Do I have to serialize the object based on the second schema and then deserialize it into an XMLDocument or XmlFragment to get it into this XmlNode I've seen examples on similar manipulations on XmlDocument types, but I'd pre ...Show All
Visual Studio Express Editions C1083: Cannot open include file: 'afx.h': No such file or directory
I downloaded a working project from the internet and tried building it. I received the following error: Compiling... StdAfx.cpp c:\projects\win_services\icon_service\stdafx.h(15) : fatal error C1083: Cannot open include file: 'afx.h': No such file or directory I searched for this file with no hits. Do I have to download the Platform SDK as well, to get this project to build Would appreciated any help that anyone can provide thanks in advance Sixpack wow, thanx you figured out my problem! :) , They should really talk more about this problem, or set up express C++ to tell you that you need the ...Show All
.NET Development Loading external assemblies that are not strongly named
Hi, I have a project which references an assembly that is external to the application (it is not in the bin directory of the project or in a path relative to the application). At runtime I use reflection to load the assembly from a supplied path. The exception ‘System.IO.FileNotFoundException’ gets thrown. The external assembly is not strongly named and so I cannot use the ‘codebase’ tag in the configuration file to specify the path. Is what I am trying to do impossible Any help will be greatly appreciated. Rakesh ...Show All
Visual Basic Replacing and Writing to a .doc
I have this dee.doc that has a [name] in it i want to replace that with Demetrius and write that line to a new word doc called deee.doc that i am creating...It creates the document but it does not write to the file the info .....what am i missing...any help thanks Dim sr As StreamReader = New StreamReader("C:\dee.doc") Dim doc As FileStream = New FileStream("c:\deee.doc", FileMode.Create) Dim sw As StreamWriter = New StreamWriter(doc) Dim str As String Dim bl As Boolean = False Dim str1 As String bl = False Do While Not bl str = sr.ReadLine() ...Show All
Visual Studio Team System No reports
Hi there, I have created 2 new team projects yesterday in TFS( deleted all the existing one) and opened few bugs/work Items, which are in diffirent states now (active/resolved). When I go to Reports and try to see the reports for them using BugList, BugRates etc. I do not see anything showing up at all. The page is just blank with no error for both through client as well as through IE. When i go to Event Log only error i see is below http://test01:8080/Warehouse/WarehouseController.asmx System.ArgumentException: Delegate to an instance method cannot have null 'this'. at Microsoft.VisualStudio.Bis.Server.Sche ...Show All
Smart Device Development Reactivating Form
I'm developing an application with several forms and an interface to an external device that uses a callback. The callback is a public subroutine and is set up when the application starts. When the callback gets data I would like to have it put it in a field on the currently active form. The problem I can't seem to get around is that when the callback executes the form becomes inactive and I can't update any controls on it. I can make event processing code on the form execute but any data I put in controls doesn't appear. If I do a show() on the form from the callback I can update the controls but the show takes so long its use is out of the ...Show All
Visual C# What's the difference between string and String?
Hello anyone knows what's the diference between string and String thanks Nothing - string is just the C# alias for System.String. David Anton www.tangiblesoftwaresolutions.com Instant C#: VB to C# converter Instant VB: C# to VB converter Instant C++: C# to C++ converter and VB to C++ converter Instant J#: VB to J# converter Clear VB: Cleans up VB.NET code Clear C#: Cleans up C# code ...Show All
