Erlan's Q&A profile
Visual Studio Express Editions File I/O problem with V C++ 2005 Express
Hi, I use a really simple macro for logging to help me debug, and I can't seem to get it to work in C++ 2005. I get these errors from the macro below, which works fine in Borland :[ Very new to C++ -- does anyone know what I'm doing wrong Is there a better way to do IO in VC++ 2005 Thanks!, Jim #include <iostream> // I/O #include <fstream> // file I/O #include <iomanip> // format manipulation #define LOG_DEBUG( x ) { \ std::cout << x << std:: endl; \ ofstream fout;\ fout.open("C:\\myfile.txt", ios::app);\ fout << x << "\r\n";\ fout.close();\ } 1>------ Build started: Project: Engine, Configuration: Release Win32 ------ 1>Compiling... 1>Engin ...Show All
Visual C# Indexed properties and IndexOutOfRangeException
Hello, The Visual C# code analysis tools tells not to throw IndexOutOfRangeException exceptions. However, the C# Indexed properties Sample throws it (and no other sample throws any exception). So, what should I do Throw ArgumentOutOfRangeException instead Supress the code analysis warning, although the online help explicitly tells not to Do not throw any exception and return a default value instead I'd follow the general rules of the framework. The collection classes throw ArgumentOutOfRangeException . The reasoning is that the argument that was specified is out of range for the given array/list. The IndexOutOfRangeException is designed for the CLR when indexing beyond a memory bu ...Show All
SQL Server Linked Server in Management Studio
I have created Linked Servers for Access databases. SPs are able to select data from the Linked Servers. In Management Studio, the General Properties are greyed out and therefore can't be modified. I need to modify the Data Source to connect to different Access databases. Can't find a way to do this with a SP either. Searches seem to indicate I should be able to modify the properties using Management Studio. Management Studio does not display the list of tables, etc. in the Access database as Enterprise Manager did for a Linked Server. The data source is on a mapped drive. The definition: /****** Object: LinkedServer [ACCESS GENERAL] Script Date: 02/05/2007 11:56:43 ******/ EXEC master . dbo . sp_addlinkedserver @server = ...Show All
SQL Server Linked Server Problems from SQL2005
When I run linked server queries from SQL2005 it fails. Query Example : SELECT * FROM [servername].master.dbo.sysobjects Error: OLE DB provider "SQLNCLI" for linked server " servername" returned message "Communication link failure". Msg 10054, Level 16, State 1, Line 0 TCP Provider: An existing connection was forcibly closed by the remote host. Msg 18452, Level 14, State 1, Line 0 Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. Notes: The linked server is configured to use the current logins security context. It does not matter whether I connect to SQL2000 or SQL2005. I have a case with MS (6 hours on the pho ...Show All
Audio and Video Development Scaling still does not affect the renderer dimensions
Hi I asked about this problem and got an answer that it was fixed here: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=718158&SiteID=1&mode=1 But it still seems to do not work as it should. The problem: I built MFT that performs 2x scaling with input type YV12, NV12 or YUY2. To test it I use a player that based on the PlaybackFX SDK sample. When the output type is YV12, everything is OK and I get the scaled dimensions from the renderer using GetNativeVideoSize(). When the output type is NV12 or YUY2 the GetNativeVideoSize() returns the original dimensions of the video and what I see is a quarter of the frame. I also tried to set it manually with the correct size but it only stretched the quarter and did not display the ...Show All
Smart Device Development Differences between DotNet Compact Framework 1.0 RTM and 1.0 SP2
Can anybody help me with the following problem I have been developing a Windows CE 4.2 Symbol handheld device which uses Scanner and RF hardware. The application is written in VB.NET and uses .NET CompactFramework Version 1.0 RTM (2002 - version 1.0.2268). It communicates with a Server Application via Tcp/Ip Sockets. When using this version of the CompactFramework 1.0 RTM (1.0.2268) the device retains it's connection with the Server when the device is either turned off or if it timesout. When powering the device on again, the connection with the server is still maintained. When Cold Booting the device and loading all files as before, except with a newer version of the .NET ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Rendering models and primitives
I'm trying to wrap my head around the use of effects and their use in rendering models and primitives. The sample code to render a model "m" looks like the following: foreach (ModelMesh mesh in m.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.EnableDefaultLighting(); effect.View = view; effect.Projection = projection; effect.World = MyWorldRotation * mesh.ParentBone.Transform * Matrix.CreateTranslation(Position); } mesh.Draw(); } While the sample code to render a primitive looks like this: basicEffect.Begin(); foreach (EffectPass pass in basicEffect.CurrentTechnique.Passes) { pass.Begin(); graphics.GraphicsDevice.Vertices[0].Set ...Show All
.NET Development binding to specific NIC & multihomed machines
I have machine with dual nics. I want to bind port 9000 to the 172.0.0.11. I tried to bind to it, however, I keep getting bound to the 172.0.0.15. Example: Ethernet adapter Test1: Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 172.0.0.11 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 172.0.0.100 Ethernet adapter Test2: Connection-specific DNS Suffix . :mytest.com IP Address. . . . . . . . . . . . : 172.0.0.15 Subnet Mask . . . . . . . . . . . : 255.255.254.0 Default Gateway . . . . . . . . . :172.0.0.200 Originally, I was doing this in C++, I am currently migrating to C++.NET 2005. So far, so good. Here is t ...Show All
.NET Development get data from access and save it into a new excel file using vb 2005
Can some1 give me a small sample of how to do this Ok nvm i finally got it the answer, i had to use excel 8 instead of 11. The code is workable ...Show All
Visual C# Using WMI to get Current Logged On User
I am attempting to use WMI to obtain the current logged on user of a remote computer. I query W32_ComputerSystem and look for the value of UserName. This method seems to work fine on my local system but not on a remote system. The query returns >50 properties, just not UserName. The properties returned are listed below. The Username that I am using to make the call has DomainAdmin rights. Any help would be greatly appriciated! Vincent Fournier CODE: public string GetW32_ComputerInfo( string strComputer, string strUserName, string strPassword) { string strReturnValue = null ; ConnectionOptions options = new ConnectionOptions (); if (strUserName != null && strUserName != "" ) ...Show All
Software Development for Windows Vista WorkFlow RunTime web designer
with Microsoft WorkFlow Foundation can have a windows run Time designer how Can I Have a web Designer for Example in an aspx file I Design My Work Flow Tanx Hi, NetFxLive is also a great project. http://www.netfxlive.com This is not a re-host. This is a designer created using JavaScript. There is a parser XOML/HTML. []s ...Show All
Visual Studio Express Editions mouse simulation
i was wondering if someone could give me an example of mouse simulation in visual basic express. i was wondering if its specificly possible to move the mouse to integers x and y, or a point, and left click. Thanks for that. no idea what was happening there. This seems to work: Public Const MOUSEEVENTF_LEFTDOWN As Integer = &H2 Public Const MOUSEEVENTF_LEFTUP As Integer = &H4 Public Const MOUSEEVENTF_RIGHTDOWN As Integer = &H8 Public Const MOUSEEVENTF_RIGHTUP As Integer = &H10 Declare Auto Sub mouse_event Lib "user32.dll" ( ByVal dwFlags As Int32, ByVal dx As Int32, ByVal dy As Int32, ByVal cButtons As Int32, ...Show All
Windows Forms Click Once Publish Version #
Anyway to assign the click once publish version # to a variable in a windows C# app I don't know of any way to do it quite like that. You could maybe build a Macro that could change the build number when building... but it would be pretty hard to pick it up from your application code. ...Show All
Software Development for Windows Vista Creating a workflow instance using a compiled workflow dll from rehosted wf designer.
Hi, I've tried to start my compiled workflow in the workflow runtime and I'm running into the following troubles: CreateInstance failed for type 'Upper.S3.Server.Workflow.CoreActivities.StateWorkflow'. Exception has been thrown by the target of an invocation. Error 1 System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializationException: CreateInstance failed for type 'Upper.S3.Server.Workflow.CoreActivities.StateWorkflow'. Exception has been thrown by the target of an invocation.. 3 3 Error 2 System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializationException: The Xaml file does not contain a root activity. at Microsoft.Workflow.VSDesigner.XomlVSServiceDesignerLoader.InternalPerformLoad(IDesignerSeri ...Show All
Visual Studio 2008 (Pre-release) XAML inheritance?
I made a user control with several buttons on it (call them A,B,C), but wanted to make this control a so-called "base class" for other user controls that would extend such a class so that the derived controls would all have the same common set of buttons (A,B,C) but would have their own unique specializations (i.e. the usual use of inheritance). I haven't had success implementing this relatively simple concept in XAML/C# with user controls... suggestions What is the correct way to do such a thing Is there any elegant way to inherit from another XAML/C# class and use its members For some reason, I assume there has to be a way to do this since you can do it in just about any language, but no one ...Show All
