Handschuh's Q&A profile
Visual C++ C++ Generics issue
Hi. I'm having a problem converting some C# to C++/CLI, which involves generics: //// C# code (compiles and runs): ///////////////////////// // The constraint requires the generic parameter T // to be convertable to the type of the derived class: public abstract class MyBaseT<T> where T : MyBaseT<T> { public MyBaseT() { } } public class MyDerived : MyBaseT<MyDerived> { } //// (equivalent ) C++/CLI code: //////////////////// generic<typename T> where T : MyBaseT<T> public ref class MyBaseT abstract { public: MyBaseT() { } }; public ref class MyDerived : MyBaseT<MyDerived> { }; /// Compiler error: Error 1 error C3393: syntax error in constraint cla ...Show All
Visual Studio 2008 (Pre-release) Error passing a string[] array - application hangs up
Hi I encountered an mysterious error today. I am passing a string[] array with 60000 elements (10 chars per element) via WCF and a netTCP binding - everything works fine.. Then I am passing a string[] array with 60001 elements (10 chars per element) via WCF and a netTCP binding - the application hangs up without an error. Here is my binding config: m_maxMessageSize = something about 1,5GB.... NetTcpBinding _binding = new NetTcpBinding(SecurityMode.None, true); _binding.ReceiveTimeout = new TimeSpan(0, 20, 0); _binding.SendTimeout = new TimeSpan(0, 20, 0); _binding.MaxReceivedMessageSize = m_maxMessageSize; _binding.ReliableSession.Ordered = true; _binding.ReliableSession.InactivityTimeout = new TimeSpan(0, m_s ...Show All
Software Development for Windows Vista Problem with keybd_event()
Hello, I am using keybd_event to simulate keyboard in applications. Function works perfect in notepad, calc, all windows, etc. but in some directx program it is getting error. On some computers it can type keys but on some others it can not. I have no idea what to do to fixt it or what is missing on those computers. Anyone has ever met this problem or know how to fix it please Btw that's a part of source [DllImport("user32.dll")] private static extern void keybd_event( byte bVk, byte bScan, uint dwFlags, IntPtr dwExtraInfo ); private void keybd_press(byte bVk) { keybd_event(bVk, 0, 0, new System.IntPtr()); keybd_event(bVk, 0, KEYEVENTF_KEYUP, new System.IntPtr()); } ...Show All
Internet Explorer Development accessing dhtml/dom within c# user control
Hi, I have an embedded .NET user control in a web page, and I need to be able to navigate to a different page with the same browser when I click on a button in the control. How can I access IE's DOM from within the embedded control written in C#. I've been researching this issue for months, and have only found answers that involve .NET 2.0, which I can't use now and C++ which I don't know. Please help me out. Thanks I'd prefer use C++ to write an ActiveX. If you want to stay in managed code, take a look at http://groups.google.com/group/microsoft.public.dotnet.security/browse_thread/thread/ffb0b5d37adbfbb6/bfb21dbfd202cf73 lnk=st&q=%22user+control%22+%22internet+explorer%22+permiss ...Show All
Software Development for Windows Vista WCS .NET 3 June CTP and IE7
I've installed the last .NET 3.0 June CTP . My installation seems ok and I can create some personal cards using the selector (with its new GUI :) Then I've tried to login to Kim Cameron's website and Microsoft Live Labs STS web site (the former one uses the HTML Object tag and the latter one the XHTML tag) Both trigger the selector... but only during 1 second and then it's closed. That's all :( Did somebody succeed in authenticating to these websites using WCS .NET 3 June CTP PS: This scenario runs well with the previous WCS version Beta 2. [updated] Here my configuration: - XP SP2 - Not fresh install of winfx (previous one was Beta 2) - IE7 b ...Show All
Visual C# Multiple application instances
Hi, How do I stop multiple instances of the same application running. (ie: if the user starts an application and then tries to start it again I want to prevent the second instance from starting) I must be missing something or doing something stupid. Thanks in advance Andrew Hi Andrew, I believe this is what you are looking for: http://msdn2.microsoft.com/en-us/library/microsoft.visualbasic.applicationservices.windowsformsapplicationbase.issingleinstance(VS.80).aspx IsSingleInstance Mark. ...Show All
Visual Studio Express Editions Web Browser Help
Hi, I'm trying to add alot of stuff to my web browser. I searched in google, but I didn't find anything. I tryed writting codes to see if I can get it, but I can't get it :( 1. Favorites 2. View Text Size 3. Web Browser site Name something like this (Visual Basic General - MSDN Forums - Mozilla Firefox) 4. History 5. Enter button when you type in the URL 6. Show the URl in the URL bar for every link. And I'll try to figure out the rest, because I have alot of stuff that I want to learn, but I think it's rude to ask for too much. Thanks. Thanks trucker, now I need to know how to set an icon for every web page on the Internet if the web site has an Icon, change the Text View size and show the URL for ever ...Show All
Visual Studio Team System More Continuous Integration problems
I need to have my team builds which run on CI to build higher level applications if a lower level framework component is changed. For example, I have a framework Component and I have an application which has a binary reference to this framework component. If the framework component is changed, I would like this to be built. I would also like the application which has a binary reference (and any others which do) to be built. Is there a way which I can do this The dependency feature of TFS Integrator is interesting and something similar might end up in Automaton. TFS Integrator is a Windows Service only that triggers builds in the background, and it uses an XML based configuration that you have to setup ma ...Show All
Visual Basic creating xdb file in access 2003
Hi, I have a situation here; my client has a credit card processing application which captures credit card detail and some basic info. of a customer. all these details stores in a file which has an extension '.xdb', on opening this file in notepad it shows some special characters and stored data. I have developed an application in ms-access 2003 for this client, which also keeps customers details and credit card info. Now, on using both these applications one has to enter same info. two times one for ms-access application and one for credit card processing application, naturally, duplication of work. Now, my client wants that info. stored in ms-access application should be made available to credit card application. I originall ...Show All
Software Development for Windows Vista Problem with IShellFolder::GetAttributesOf
Hi, In vista RC1 I'm seeing a really odd problem with IShellFolder I have some fairly simple code which does something like: sfg = SFGAO_FOLDER|SFGAO_FILESYSTEM|SFGAO_BROWSABLE; pShellFolder->GetAttributesOf(1,&idl,&sfg); if(!(sfg&SFGAO_FILESYSTEM)) { continue; } What I'm observing is that in RC1 SFGAO_FILESYSYSTEM is only ever set for shared folders! On all other OS's it works as expected (and documented). I'm guessing this is an RC1 bug - where can I report this to make sure it's fixed for the release Tony This appears to still be happening - just tested on the final production Vsita build. I don't have time to do any further debugging until ...Show All
Visual C++ Problem using log4net in my C++ program
I have a C++ program converted from an ANSI C. Now it is created as a CLR console application. As an Art graduate, I am lost and do not know how to add the log4net statement into my Cpp program. Please help. I promise to grade your answer! Thanks This is the error message during compilation: Error 193 error C3699: '*' : cannot use this indirection on type 'log4net::ILog' e:\myApp.cpp 35 #include "stdafx.h" #include <stdio.h> #include <string.h> #include <time.h> #include <fcntl.h> #include <string> #include <iostream> #include <cstdio> #ifdef WIN32 #include <winsock.h> #include <io.h> #else #def ...Show All
Smart Device Development CAsyncSocket calls OnConnet(0) when the connection fails
I am porting an MFC application to PocketPC that uses the CAsyncSocket class. I was able to make it connect successfully to the server. However I have the following problem: If the server is not reachable or the server is not started, the OnConnect(int nErrorCode) is called with nErrorCode==0 (like on a successful connection). This is a problem because my internal state thinks it's connected, but obviously it isn't. Has anyone experienced similar problems with the CAsyncSocket Is there some sample code available for a client CAsyncSocket application on the PocketPC That would help me to find the problem. The code works fine on the desktop version. Here are some more details and some code snippets: CTcpSocket is derived from CAsyncSocket , ...Show All
Visual C++ Static object initialization and thread safe
I have ran into a situation that is very werid. Could anyone help me This a C++ application built and debugged on Visual Studio .Net 2005. Basically I'm implementing a singleton class using double check locking pattern. I have read many arcticles about how this pattern is not thread safe, but my problem is slightly different. Here is the pseudo code: MyMutex.h/cpp class MyMutex { public: ... Lock() { ... } Unlock() { ... } ... }; ThreadMutex.h/cpp class ThreadMutex { public: ThreadMutex() { ... _lock = new MyMutex(); ... } Acquire() { ... _lock->Lock(); ... } Release() { ... _lock->Unlock(); ... } ... private: M ...Show All
Windows Forms checkbox.text databinding?
one of the easiest way of binding data is to use a Binding source Dim mBindingSource As New BindingSource mBindingSource.DataSource = ' your datatable Now you can bind your controls properties to this binding sources datamembers Control.Databindings.Add( propertyName,dataSource,DataMember) Me .CheckBox1.DataBindings.Add( "Text" , mBindingSource, "Name" ) For more information check this article http://msdn2.microsoft.com/en-us/library/ef2xyb33.aspx I hope it helps, regards Ayhan ...Show All
SQL Server SQLCMD VS BCP
Hello, I have the following BCP bcp.exe "SELECT * FROM LAW.dbo.A" queryout "C:\Test\Test.txt" -c -q -C1252 -T -S "SEA2-LawrenceB1" -t "," ResultSet Seattle,Lawrence,1 New York,Jeanette,2 However, my issue is that BCP DOES NOT include Header in ResulSet. Ideal ResultSet (first row is Header) City,Name,Num Seattle,Lawrence,1 New York,Jeanette,2 I would like to use SQLCMD to include Header info. However I am not able to find the correct switches to accomplish this. The current format which I DO NOT desire includes - "..........." on the second time, "<rows> are effected" message is returend. Let me know if any of you could help me with this ideal format in ...Show All
