liudanpao's Q&A profile
Software Development for Windows Vista problems communicating with the host
Hi, I am trying to get host communication working because I need to communicate back to the host if for example, a process will be long running. I've set up a very simple example which raises an event on the host and every time I run it, I get an error: Done Exception has been thrown by the target of an invocation. Press any key to contine The code for my test harness is as follows: #region Using directives using System; using System.Collections.Generic; using System.Text; using System.Threading; using System.Workflow; using System.Workflow.ComponentModel; using System.Workflow.Runtime; using System.Workflow.Runtime.Hosting; usi ...Show All
Visual Basic add Data connection in VS server explorer
hi everyone, I'm new to .net programming and to VisualStudio. I installed VisualStudio 2005 Beta 2 and SQL server Express on my PC and created Pubs database for my exercise using a script downloaded from MSDN site. Then I tried to add a new Data connection in VS Server Explorer. choose SQL server as my Data source and enter {machine-name}\SQLEXPRESS as my server name and tried to testConnection. I got an alert -"timeout expired ......server is not responding" few more detailes - 1. I tried to remove the "\SQLEXPRESS" or write ".\SQLEXPRESS" or "localhost\SQLEXPRESS" from the server name -no success. 2. I tried to connect ...Show All
Smart Device Development How can I control keyboard on Pocket PC to appears and disappear using program
Hi, I am compiling a program with Visual Studio 2005 Developer Edition and VB.net and Windows CE 2003 SE on a Pocket PC. Now, I have two interfaces: A and B. What I would like to do is: When the interface B opens from A, keyboard will automatically appears. After I input something into a textbox on interface B, I will click a button. After I click this button, the keyboard will disapper, interface B will close and return to interface A. How can I control keyboard on Pocket PC to appears and disappear using program Any ideas, sample codes or any hyperlinks Thanks a lot. You need to place an InputPanel control on the ...Show All
SQL Server SQL Server 2005 JDBC Driver 1.0 error in using XA datasource
We are in the process of configuring a j2ee application with SQL Server 2005. We have downloaded the new version of SQL Server 2005 Java Database Connectivity (JDBC) Driver 1.0. We are having some issues in getting it to work using the XA datasource. Description of the error is as follows: javax.transaction.xa.XAException: java.sql.SQLException: Failed to create the XA control connection. Error: Could not find stored procedure 'master..xp_sqljdbc_xa_init'.. at com.microsoft.sqlserver.jdbc.SQLServerXAResource.start(Unknown Source) Has anyone else has encountered this and possibly found a solution. Regards, Bindu ...Show All
Visual C# Problem with passing array to C callback
I have a C dll file where you can register callbacks. In my progress of extending this dll I am having problems getting it working from C# (Visual Studio 2003): My C# prototype is: public delegate int CustomCallBack_pfn( ref T [] pT, ref int nCount); The equivalent C function pointer uses stdcall as it's suppose to for compatibility. What I do is to initialise a C array with 16 fields and then pass it to the callback. The callback will eventually fill some of the fields and return the count. Until now I've been using the simplified version: public delegate int CustomCallBack_pfn( ref T pT); Where only 1 f ...Show All
.NET Development GC hangs with 100% CPU utilization ?
Dear .NET gurus, I am trying to debug some .NET 1.1 application and and experience a strange behavior - from time to time the process hangs with 100% CPU and has to be killed. The threads in the application that burn the processor time are actually unmanaged threads busy doing the following: WARNING: Stack unwind information not available. Following frames may be wrong. 09f8ebc8 00aab14e mscorwks!GetCompileInfo+0x1840b 09f8ebcc 09f8ebd4 0xaab14e 09f8ebd0 00000000 0x9f8ebd4 (this one burns 98% of CPU) Also there are three additional theads doing this: 0660f408 79299fec ntdll!KiFastSystemCallRet 0660f438 7929a54d mscorwks!CorMarkThre ...Show All
SQL Server How can I make a Matrix Transposition in SQL ?
Can we do matrix transpose (rows become columns and columns become rows) in standard SQL 1 2 3 4 5 6 7 8 9 changes to 1 4 7 2 5 8 3 6 9 how about the situation when no of rows <> no of column let's consider the no of rows it's fixed and known before running the SQL statement. thanks. What do you mean standard SQL Here is a 2005 version that will rotate your data (it is not as elegant without CTE's, UNPIVOT and PIVOT, but it can be done if you need it: The basic idea used was to add a key for the rotate, and then do an UNPIVOT followed by a PIVOT: set nocount on create ...Show All
Visual Studio Multiple Tables in Expressions and Tooltips Question
Hello, I've created two DataTables in my DataSet. Each of the queries have a SUM in the Select statement, which is why I can't just join the two tables together in one query to create a single DataTable. Now, I am trying to generate a pie chart based on these tables. What I need to do is add both SUM fields together in each of the tables to get the value that I require. I have created a relation on the DataTables on the RfsTypeCode field. But since the pie chart can only have one value for DataSetName, how do I then refer to fields in the other table I've tried using the First() function, but that doesn't seem to work. My second que ...Show All
Game Technologies: DirectX, XNA, XACT, etc. DXUT tutorial
Is there more information I can get on how to use the sample framework that comes with DX other then on microsoft.com. There's not a lot there, and I really want to be able to use the user interfaces and controls effectivly. Thanks, Shane Tom Miller 's book " Beginning 3D Game Programming " also uses the sample framework quite heavily, and he gives you a fair bit of information on what's being used and why. Bear in mind that this was written against the October 2004 SDK, so some of the code needs to be updated to work with the current versions, and that some of the samples in the book aren't quite rig ...Show All
Windows Forms IssueVision Installation problem in Password Complexity
I am trying to install IssueVision on my local machine. Near the end of the installation there is a security error stating that password complexity requirement have not been met. (I am running Yukon), Is there a spoc I can use to temporarily turn the requirement off Or alternative installation instructions Thanks you should change sql script for fitting sql2005 or sql express. it's a tip. when issue vision installer shows installation database, all issuevision sources are \program files\issuevision. just copy and rename to other directory temporary. and cancel installation. after this job, you may change it's renamed name into ...Show All
Visual Basic Sharing classes between solution projects
I have created a VB.NET project (Project1) in a solution and I would like to share some of its classes with a new project (Project2) I am adding to that solution. If I right click on the target project, Project2, and add existing items, and then use 'link file', I am able to add a link to the desired class files residing in Project1. However when building the solution I find that I get errors because Project1 refers to the classes with "Imports Project1.MyClass", and Project2 when reading the linked file does not understand what Project1 is. I want to keep the code for each project encapsulated in one exe ...Show All
Visual C++ AMD 64 Optron and Manifest
When I add manifest to my application it does not work on AMD Optron 64 Biit platform. But the same application when built without Manifest works fine. I am a little puzzled wether Manifest has any special mechanism of deployment on AMD optron 64 bit machine. Could you put it under the debugger and see which dlls are trying to be loaded Thanks, Ayman Shoukry VC++ Team ...Show All
Visual C++ native members of managed classes?
Hi jedediah! What's the preferred way to effectively have a native class as a member of a managed class What do you mean class NativeClass { }; public ref class ManagedClass { protected private: NativeClass *_pNativeMember; }; jedediah wrote: It's the C#/VB monkies I'm worried about. C++/CLI seems to do the best job of making disposing transparent but it seems to be a house of cards with the other languages. I definitely Agree with that... When Visual C++ entered the .net framework in VS2003 I knew ...Show All
Software Development for Windows Vista About persistence, IEventActivity, Transactions and correlations
Hi, I have a bounch of questions. 1. Persitance The activity can be adorned with the [PersistOnClose] attribute. What happens in the following scenario: - we have a sequential workflow with 2 activities: A1 followed by A2 - activity A1 is adored with the [PersistOnClose] - A1 finishes executing and moves to Closed state - the runtime persists the activity A1 - the computer crashes - after the computer is restarted, the workflow hosts is started again. The persistence provider automatically (am I right ) loads active workflows and continues the execution at the activity A2 . Right How does the runtime know, which activity should be ...Show All
SQL Server How to move the whole SQL 2005 instance?
Hi, What is the simplest way to move the whole instance from one box to another. I can stop all SQL services for couple hours, it's no problem. But I'd like to make absolute copy. So I need to move all databases, logins, roles, triggers, stored procs, packages, jobs, credentials, endpoints, proxys, etc. I need just replace the server (the box itself) with a new one. Thank you. Do you mean backup and restore for each database Or for all at once By the way, would it work: If I delete whole folder "SQL 2005" on the new box (after installation) and then copy this folder from the old box ...Show All
