visual-studio-2008

C++ Convert Sytem::String^ to LPCOLESTR

社会主义新天地 提交于 2020-01-03 04:53:08
问题 I write in mixed mode (C++/CLI) and I can not resolve this problem: String ^progID = "Matrikon.OPC.Server"; CLSID clsid; HRESULT result = CLSIDFromProgID(progID, &clsid); error C2664: 'CLSIDFromProgID' : cannot convert parameter 1 from 'System::String ^' to 'LPCOLESTR' How can I convert String^ to LPCOLESTR ? Thanks! 回答1: First, lets convert System::String to char* IntPtr p = Marshal::StringToHGlobalAnsi(progID); char *pNewCharStr = static_cast<char*>(p.ToPointer()); second, casting char * to

Consuming a WCF service - c#, VS2008 with 3.5 SP1

杀马特。学长 韩版系。学妹 提交于 2020-01-03 03:22:06
问题 I am trying to cnsume a WCF service.I was given the URL to the svc file. 1. Created a Windows form application 2. Added a service reference to the svc file 3. In my code behind during form load event, i call the method exposed by service ServiceReference1.SearchServiceClient search = new WindowsFormsApplication1.ServiceReference1.SearchServiceClient(); var serviceResult = search.SearchByClientNumber("1"); I get this error The server was unable to process the request due to an internal error.

Displaying a video using opencv

耗尽温柔 提交于 2020-01-03 03:01:07
问题 i have a little problem according "displaying a video with opencv". The code is written in c++ with visual studio 2008. here is the code: int main( int argc, char** argv ) { cvNamedWindow( "xample2", CV_WINDOW_AUTOSIZE ); CvCapture* capture = cvCreateFileCapture( "Micro-dance_2_.avi" ); IplImage* frame; while(1) { frame = cvQueryFrame( capture ); if( !frame ) break; cvShowImage( "xample2", frame ); char c = cvWaitKey(33); if( c == 27 ) break; } cvReleaseCapture( &capture ); cvDestroyWindow(

.Net MemoryStream close issue

点点圈 提交于 2020-01-03 02:00:34
问题 For a .Net MemoryStream object instance, do I need to close it explicitly after using it? Or no need to close it? Which is the best practices? I am using VSTS2008 + .Net 3.5 + C#. 回答1: you should close it when you are done with it. The best practice is to close the stream in the finally section of a try-catch-finally block. you can get more information here: http://msdn.microsoft.com/en-us/library/system.io.memorystream.aspx 回答2: Better yet would be to use Using using (MemoryStream ms = /*get

Unable to create new Team project over the internet getting SQl Reporting service resolve error

烂漫一生 提交于 2020-01-02 21:57:25
问题 Hi I have installed a Team Foundation Server 2010, and it works perfectly over my Lan, but I need it to work over the internet too. My problem is that when Im connected to my team server over the internet, I get the following error, when I try to create a new Team project. TF218027: The following reporting folder could not be created on the server that is running SQL Server Reporting Service: //TfsReports/myTeam. The report server is located at: http://my-server/reports. The error is: The

Timeout problem running WatiN tests as part of TFS build

南笙酒味 提交于 2020-01-02 17:16:33
问题 I've gotten a simple WatiN web test running on my dev environment and am trying to get it working on the TFS build server. It is failing when just trying to load a page with the following exception: WatiN.Core.Exceptions.TimeoutException: Timeout while Internet Explorer busy. I've set the test timeout to 3 minutes which should be plenty. I've read that this could be caused by IE protected mode, but I'm not sure how to disable that for the TFSService account. I'm using Visual Studio/TFS 2008

Timeout problem running WatiN tests as part of TFS build

断了今生、忘了曾经 提交于 2020-01-02 17:16:33
问题 I've gotten a simple WatiN web test running on my dev environment and am trying to get it working on the TFS build server. It is failing when just trying to load a page with the following exception: WatiN.Core.Exceptions.TimeoutException: Timeout while Internet Explorer busy. I've set the test timeout to 3 minutes which should be plenty. I've read that this could be caused by IE protected mode, but I'm not sure how to disable that for the TFSService account. I'm using Visual Studio/TFS 2008

vb.net - automatic XML comments - ''' — Can I change the automatic defaults?

假如想象 提交于 2020-01-02 14:31:13
问题 I'm using Visual Studio 2008 SP1 in VB.NET, when I type ''' above a function, some automatic default XML comments appear: ''' <summary> ''' ''' </summary> ''' <remarks></remarks> I would like this to be the following instead: ''' <summary></summary> ''' <remarks></remarks> Is there a way to change what appears when you type ''' above a function? 回答1: They key is in the VBXMLDoc.xml file. It provides templating for all of the XML comments in VB.NET. Still have not checked if there is a

App.Config Ignored After Pre-Build Event

橙三吉。 提交于 2020-01-02 10:05:54
问题 I have a solution with several projects and several developers, each with their own environment (of course). To manage connection strings between each environment, I have created several app.config files for each environment: app.config.dev, app.config.qa, etc. The pre-build event simply copies the app.config.$(ConfigurationName) to app.config. This pre-build event is done for each project in the solution, and the connection string is included in each (including the test project). When I use

How Can We Have A SCROLLABLE GridView With Fixed Header?

一世执手 提交于 2020-01-02 09:43:49
问题 How Can We Have A SCROLLABLE GridView With Fixed Header???(in vs 2008 - asp.net with c#) Fixed Header is my problem! i test many ways for doing that and see some live demos / but they did not work. can u show me a simple way 4 doing that with an example? 回答1: two tables, one for header and one for content. only problem is that u need to set specific widths for each column. <style> .tbl th { border: 1px solid black; background:#DDD; } .tbl td { border: 1px solid black; border-top:none }