Ross Watson's Q&A profile
Visual C# Call Method From External Process
I'm not sure if this is possible, but I need to call a method in a running program from a different program. The method I want to call is being loaded into the remote EXE via a DLL. If I try using DllImport, it does call the method, but it doesn't work correctly. The method is supposed to return its class's member information, but if I use the DllImport from C# to call the method, it doesn't return the actual remote class's members, just some garbage values. Also, the program and DLL were written in C++. For example, TestApp has a class called TestClass. This class has a bool called TestMember and a method called TestMethod that returns the value of TestMember. When I write a program and use DllImport to import TestMethod, it returns true, ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Missing sprites
I am developing a racing game with DirectX 9.0c and VC++ 2003.NET. When I use the retail version of direct3D some of my sprites dont show up, when I switch to debug version of direct3D, all sprites appear once again. Tools >> Options >> Debugging >> DirectX is where i change from retail mode debug mode of Direct3D Why would this happen Debug mode checks your parameters a little better than the retail mode so maybe you are doing something strange that the debug runtime is allowing through. If you increase the debug out put to full in the DX control panel do you see any errors or warnings go by ...Show All
Smart Device Development How to detect strength of network connection?
Hi, I wants to create a connection manager component using .NETCF. The component will detect whether any of the following type of connection is available and strength of that connection. Internet using GPRS Internet using ActiveSync WI-FI IR Bluetooth Is there any function/Method/library that will satisfy my need ...Show All
Visual C# To _, or not to _?
The .NET Framework is littered with private variables preceeded with the _ (underscore) character. Is this good practice Or something Microsoft are trying to stamp out Hello, This is truly a debatable topic and many discussions has been already done on it. I would like to contibute a little on it. I worked on .Net Coding standard for my organization about a year back. And from my Study I learnt that Microsoft is moving intentions of their programmers community from old m_ or _ style to new standards which are recomended to be used in .Net. use of "_" and hungarian notation is forbidden. As many other people have said that it depends on the way you feel comfortable I go with this stateme ...Show All
Smart Device Development Running a SQL Application
I am creating an application that accesses a SQL database and everything works fine on the emulator, but when I deploy I am missing a lot of the DLLs. Can someone please inform me what I need to install on the PocketPC I have been searching for a SQL Mobile that goes on the pda but everyone one that I have downloaded only installs on a PC. I am runnign Windows Mobile 2003 SE. Links to download the program would be greatly appreciated even if I have to buy the license to download. If there is a trial version for Pocket PC that would be great also....If there is anything else I need please let me know. Many thanks, Tbot That of depends on your device. Say, you have Windows CE 5.0 device with ARMV4I CPU, in that case grab file( ...Show All
Visual Basic Application hanging on Serialport .Close method
This one has me stumped. I've created a class to interface with a device on a comm port. I've decalred the serial port: Private WithEvents moPort as System.IO.Ports.SerialPort In the New event, I create the port and open it, works great. I communicate just fine, handle everthing going in, coming out no problem. When I go to close the port, by just a .Close command in a "Disconnect" method I've defined or in the IDisposeable implementation, the entire program hangs up. I can hit Pause in the IDE and it highlights the "moPort.Close" line, the call stack always shows something like: [In a sleep, wait, or join] [External Code] Executablename!ProgramName.ClassName.Dispose(boolean Disposing = True) Executablename!ProgramNa ...Show All
Visual C# C# 2.0 closures - bug or feature?
Would anyone care to explain me what is happening there To me, both i and ii seem to be local variables within the same scope, so why the compiler treats them differently using System; using System.Collections.Generic; internal delegate void VoidDelegate(); internal class Program { private static void Main() { List< int > a = new List< int >(); for ( int i = 0; i < 10; i++) { a.Add(i); } List<VoidDelegate> handlers = new List<VoidDelegate>(); foreach ( int i in a) { handlers.Add( delegate { Console.Write(i); }); //If we comment out line above and uncomment two lines below, we'll get the expected "0123456789" result. //int ii = i; //handlers.Add(delegate { Console.Write(ii); } ...Show All
Visual Studio Team System Associating work items and changesets
I am trying to use < UpdateAssociatedWorkItems > true </ UpdateAssociatedWorkItems > however, I can't find any documentation on how it works. I am trying to add build to the bugs that have been resolved so that they can show up in the "associated work items" and "associated changesets". I am not sure how I need to flag my bugs/tasks so that UpdateAssociatedWorkItem would work. Please help. This should all just work by default... That is, changesets should automatically be associated with builds in the same team project (it's a bit more complicated than this, but to a first approximation this will be true). Work items should also be associated with builds, so lo ...Show All
Visual Basic How do I change/specify Webbrowser Control font?
I am using the webbrowser control to display HTML formatted string in a VB.NET 2005 application. The default webbrowser text seems to be Times New Roman 12pt. Is there a property or other method to change the default font and size Thanks... ...Show All
Visual Studio Team System Problem with source control, web projects and the bin directory
Hi I have a problem with web projects and source control. It appears that the bin directory is automatically added to source control. This is causes a problem whenever anyone compiles the solution as the same binaries are attempted to check in and of course someone has already checked out and locked the binary. I assume if a change is made to a binary it is automatically locked. Unfortunately even though I have deleted the bin directory from source control whenever the solution is compiled it tries to add the binary to source control again. Does anyone have any suggestions on how I can get around this. Cheers Brett Hello, I have a similar problem. We have a Web App with a lot of references, and every time we do Check I ...Show All
SQL Server report viewer and reporting services security
i have a web application in studio 2005 using the report viewer control. i have my own security model implemented on my web pages for clients [1..n] each of the [1..n] clients should be able to view reports of their order history. i have the report viewer set up in url mode. the question is that when i have drill downs in my final reports, a user with some tech knowledge, would be able to obtain the url to my sql server running reporting services. the sql server will not be given a port 80 acess. how do i go about displaying reports without any savvy user being able to locate the server locations/credentials i donot want to create windows account for each [1..n] clients as this is ever growing ...Show All
Visual Studio Express Editions iTunes COM Problem
Hey there. I am writing a program that includes showing the current playing song on iTunes. I also want to show the current playing song on Windows Media Player and WinAmp. My problem is the following: If iTunes (and I'm assuming WinAmp or Windows Media Player) aren't open or the music is paused and now Current Song is being passed, my program freezes. These are the steps I've taken to showing the Current Song. 1) I've added iTunes 1.8 Type Library to my project 2) In Form1.vb I've added the following code above Public Class Form1: Imports iTunesLib Imports System 3) In a Timer I have the following code: Dim itunesapp As New iTunesApp SongNameToolStripMenuItem.Text = (itunesapp.CurrentTrack.Name) SongArtistToolStripMenuItem.Tex ...Show All
Visual Studio Team System Recorded script fails in the Login page and then passes in the Next dependent requests while replaying an web test
when i try to rerun my recorded script this is what happens : suppose i have recorded a web page which has a 'Login page', 'home page',' services page' and a' logout' first when i record the script my login is working and i will be able to go to the login page - home page - services page - logout .. while i replay the same i will not be able to login to the login page coz i get a error "user name or password is wrong" ...but the next page ( services page ) i script will pass on the when i goes through the other dependent URL i.e Services page and logout page also when i try to paste the URl direclty in Internet Explorer (Services page or the home page or logout page) i go to the Login screen ...Show All
Software Development for Windows Vista two issue for Workflow,anyone can help me.
1.the workflow foundation will include ActivityDiagram like UML in the future 2.the workflow designer will support bridge style for cross connection line thanks in advance! The sequential workflow is similar to the activity diagram in UML. If you are looking for something likea sequence diagram in UML, then you would have to build your own workflow type or at least designer. Matt ...Show All
SQL Server generate report from data warehouse
Dear all, I use sql server 2005 as a data warehouse. A report get data from this data warehouse. I found that it is very slowly. How can I tune the sql or give me some advices about generate report from a data warehouse Thanks you Hello. If you are running a relational data warehouse, without any cubes(OLAP), you can find som good advice here: ( http://www.microsoft.com/technet/prodtechnol/sql/2000/reskit/default.mspx mfr=true ) , that are still relevant. HTH Thomas Ivarsson ...Show All
