Dario Galvani's Q&A profile
Software Development for Windows Vista MessageBox fails after creating IDiscMaster2 !?!
Maybe I've been away from COM too long (on purpose!) but I have a bizarre problem that I've simplified down to this: ::CoInitializeEx(0, COINIT_MULTITHREADED); { CComPtr<IDiscMaster2> tmpDiscMaster; tmpDiscMaster.CoCreateInstance( __uuidof (MsftDiscMaster2)); //S_OK }//end of scope for the CComPtr ::CoUninitialize(); //if the above code runs first, this message box fails / is ignored int rc = ::MessageBox(NULL, _T("Wait here"), _T("title"), 0); //messagebox returns immediately with value 1 (IDOK)!! Is there some uninit I'm forgetting ! It must be something simple. I don't remember ever seeing it fail so oddly though... I ...Show All
.NET Development database diagram node in server explorer
I'm using Visual Studio 2005 to create a .net web application. When I connect to the SQL server database in the server explorer, I don't get the database diagram node. Do I need to load something so I can see this Thanks. Hi Paul, So how in SQL2005 do I create a new Database Diagram as all I see is stuff about connecting to reports. It might be that this is all taken care of in reporting services But I am connecting to a sql2000 db via sql2005 sqlwb. It would have been so nice to have a version of Enterprise Manager that could connect to an SQL2005 DB as it is much leaner/quicker that the SQL2005 equivilant. Is the cost of using SQL2005 the lost of database diagrams versa having to ma ...Show All
.NET Development edit OpenFileDialog details?
Hello folks. First time poster, thought I would join the clever people of the world :D Anyway, I am currently trying to design a form which will allow my users to email details to a web daemon, but I am wanting to also allow them to send attachments on this form. Having never done this I searched around and found an example which is asking me to do the following; Change OpenFileDialog Name OFD DefaultExt *.* InitialDirectory c:\ Multiselect True How abouts do I go about this My form for the attachments contains a listbox and two buttons (add attachment, remove attachment) any help would be very much appreciated. Ben Hi, May the following code help you to solve this problem, [The file addition/remov ...Show All
SQL Server Integrated Security doesn't work - "Not associated with a trusted SQL Server connection." Error
Hi, I have a piece of Java code that needs to connect to SQL 2000 (SP4) using Windows Authentication. It's running on Windows Server 2003 SP1. I tried JDBC v1.1 and followed the code from the following blog: http://blogs.msdn.com/angelsb/default.aspx p=1 But still get this error as shown below. Any help appreciated. I am using JDK1.4.2, "sqljdbc_auth.dll" is located under "E:\SQL2005JDBCDrv\sqljdbc_1.1\enu\auth\x86", also made a copy under "E:\JavaTest" and "C:\Windows\System32" but still won't work. Cheers Allan =========================================================== E:\JavaTest>javac -classpath ".;E:\JavaTest\sqljdbc.jar" TestW2.java E:\JavaTest>java -classpath ".;E:\JavaTest\sq ...Show All
.NET Development timer vs thread performance
which implementation is better in terms of performance/efficiency/etc. [code] System.Threading.Timer t = new System.Threading.Timer( delegate { DoSomething(); }, someState, 0, 50 ); [/code] or [code] System.Threading.Thread t = new System.Threading.Thread( delegate() { while (_running) { DoSomething(); Thread.Sleep(50); } } ); t.Start(); [/code] _running is some private bool variable that would be set to false when Stop() is called or something similar. whereas, the Timer implementation would need a call to Change, respectively. thanks in advance. you are correct. calling Read does block the thread. anywho, i ended up implementing it anyways, and of the 3 ways to read from the serial po ...Show All
.NET Development NegotiateStream...Server rejecting client credentials
I have some networking code that I have modified to allow for using the NegotiateStream to authenticate clients when they connect. I am having a strange problem where the authentication is failing with " The server has rejected the client credentials " (Logon failure internally). The weird thing is that the same exact code works on another machine. On the machine where it isn't working I can pass the CredentialCache.DefaultNetworkCredential and it works but using a username/password/domain for an account on the very same machine doesn't work. I am running on XP not connected to a domain (both computers). I have tried using several accounts in the credential for the client auth but no matter what account is used it fails wi ...Show All
SQL Server Encryption in SSIS Package
Hello, I want to import data from a excel source to SQL Server 2005 using SSIS. Among all the calls columns to be imported, there is 1 column which needs to be encrypted using asymmetric encryption and stored in destination table. Can anybody guide me how to program SSIS package using encryption function. JatinShah wrote: Hello, I want to import data from a excel source to SQL Server 2005 using SSIS. Among all the calls columns to be imported, there is 1 column which needs to be encrypted using asymmetric encryption and stored in destination table. Can anybody guide me how to program SSIS package using encryption function. I think Donald Farmer's book contains some information on how to do this. You'll be ab ...Show All
Software Development for Windows Vista Need help with WF and WindowsForms
I have build a windows form with two buttons. The first button needs to start the workflow and at some point the workflow execution is supended using the suspend activity. Using the other button I need to resume the execution. The code I use is as follows: private void Authenticate_Button_Click( object sender, EventArgs e) { using ( WorkflowRuntime workflowRuntime = new WorkflowRuntime ()) { AutoResetEvent waitHandle = new AutoResetEvent ( false ); workflowRuntime.WorkflowCompleted += delegate ( object s, WorkflowCompletedEventArgs ex) { waitHandle.Set(); }; workflowRuntime.WorkflowTerminated += delegate ( object s, WorkflowTerminatedEventArgs ex) { Console .WriteLine(ex.Exception.Me ...Show All
Windows Forms LoadDataRow() Exception: "Input array is longer than the number of columns in this table."
Hi, I am using framework 1.1 I am trying to use LoadDataRow() to get rows from one table and add them to another datatable, but I always get the exception "Input array is longer than the number of columns in this table." even though the structure of both tables is exactly the same.. _dtposition is the source datatable and dtTmp is the table in which doing LoadDataRow to get rows from _dtposition DataTable _dtPositionData = GetData(); DataTable dtTmp ; dtTmp = _dtPositionData.Clone(); dtTmp.BeginLoadData(); DataRow dr1 = dtTmp.LoadDataRow(_dtPositionData.Select("MyId = " + _sMyId),true); //Exception thrown here dtTmp.EndLoadData(); There is no primary key set for _dtPositionData. so, I manually created primary key columns  ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Options for older laptop w/ no shader suppport?
Besides my desktop, I have an older Vaio K35 laptop w/ Radeon IGP 345M integrated graphics. I can install DX9, XNA and Game Studio Express, and I can edit/build XNA projects. However, the integrated graphics dont support the minimum shader version so I get an exception whenever I try to build/debug. I looked for newer drivers, but so far it's a no go. Is there a way I can force GSE to use the directx reference renderer I don't really care about performance, I just want to see that thinkg look visually okay. Even 1fps is fine. I just want to have a way to work on my XNA projects while on the road. Worked like a charm, thanks! For anyone who haven't checked it out yet, basically nuclex.org provides ...Show All
Windows Forms navigate between forms in mdi app
Hello, I have a mdi app created using vs 2005 mdi template. I have created 5 forms. I have set the first form to be the login form. The login screen will ask for credentials if they have them, but if they do not, then they click a linkbutton and it will popup another form for them to fill out while hiding the loginform. How do i navigate between the loginform and createaccount form Since the loginform is the parent of the mdi app, I cannot dispose of it what I want is to be able to hide the loginform and show createacctform. Once they have created an account, then I want the loginForm to be shown again and after logging in properly, show the main part of the mdi application. any help would be appreciated. I feel I am missing somet ...Show All
Software Development for Windows Vista How to add metadata such as date, creator, producer to XPS simliar in PDF format
Hi, I am trying to find out if there is any sample XPS file with metadata having such data as Producer, Creator, Date similar the one we see in PDF. Thanks, Ash Yes we did. The gist of the response was "we don't have a clue". I gather they never quite fleshed this concept out before unleashing the XPS spec on the world. I was making some progress in hacking in a custom XML part but the project got put on hold for now because of all the roadblocks to implementation at a reasonable development cost. I expect we may revisit it later. Brad. ...Show All
Visual Studio 2008 (Pre-release) MaxiVista makes WPF unusable
I started a similar thread on Channel 9 , but on Rob Relyea's suggestion I'm moving it here. Here's my orginal question: I downloaded .NET 3.0 RTM today and installed it on my Windows 2003 Server development server. I tried double clicking on a XAML file and the system went nuts: the screen flashed, the mouse kept moving to the center and corners of the screen, etc... It looked like my machine was taken by the Indigo/Avalong ghost... Finally I had to bring up task manager and kill IE. I tried multiple times, with different XAML files. I tried uninstalling and re-installing, downloading the fast installer and the full re-distributable (50 MB). No luck - WPF just doesn't seem to work. I've been u ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Does LPD3DXMESH have built in values I can adjust manually?
I have my CUBE.x loaded into LPD3DXMESH object. Are there specific flags I can set for the entire object Like I want to translate/rotate/scale just this object in the view of my camera. I don't want these changes to affect any of my other loaded models. Are there local axises that I can alter Actually, I tried to answer your question at the beginning of the thread... As for your last one, use this: mWorld=mRotateY*mTrans , that is , rotate first, then translate. Was it hard to try it yourself ...Show All
SQL Server Multi language for Parameter Prompt within SSRS
I need to generate a multi language report. So I was able to create everything depending on the global variable User!Language except the prompt of the parameters of the report. The prompt seams only to be a text and is not customizable by a expression ore something else. So over all is there an option/way to show to the user the prompt in his language without creating a report for each language Thanks ...Show All
