cmfairbank's Q&A profile
.NET Development Forcibly resize a program problem.
Hey, First of all, sorry if I am posting this is in the wrong place. I'm having a bit of a problem with something I am trying to do: I want to make an application that waits for a process to start. When it sees that this process is launched, it should forcibly resize the window of this application to new size. The reason why I want to do this is simple, this program, a game, in question only supports one size in windowed mode, 640x480. I find this silly since this game uses Direct3D for its graphics, so resizing the window would be very simple. So I'm trying to do this myself with C#. The problem I'm having is that after receiving the handle to the window I want to resize, and after resizing it, the actual viewport of the DirectX's r ...Show All
Visual C# Allocating Memory for huge array
I have an array of struct which I can create up to a certain size. The max is 250M, but I have 4G of ram on my WIndows XP Pro machine. How can I allocate more I read straight into memory from file using 'unsafe' code. I need to load in about 1G. Can you help me Moon I have a lot of legacy code that needs the data to be in one array in memory unfortunately. I have something like IN ENGLISH not code Public Struct Peter { double a; double b; } int FileHandle = "unsafe code to create file" int len = FileHandle.Size; int RecSize = Marshal.SizeOf(new Peter()); data = new Peter[len/RecSize]; //THIS IS WHERE IS GET MemoryException when FileHandle is large da ...Show All
Smart Device Development how to add a item on today screen as a list item on pocket pc
I am using windows mobile 5.0 for pocket pc. How can I add an item on today screen so that it can be navigated by the device soft keys that is up ,down e.t.c keys. Previously I have used following function and call it on WM_PAINT event. But my application icon can only be used by stylus.This icon launches my application Can I do any modification in this code so that it can navigated by device navigation key void RepaintItem(HWND hwnd) { PAINTSTRUCT ps; RECT rcWindBounds; RECT rcMyBounds; HDC hDC; HFONT hFontOld; COLORREF crText; GetWindowRect( hwnd, &rcWindBounds); hDC = BeginPaint(hwnd, &ps); // create a custom rectangle relative to the client area rcMyBounds.left = 0; rcMyBoun ...Show All
Visual Studio Team System Profiling on WinMobile with VS2005?
Does the Team System upgrade support profiling memory and/or performance on WindowsMobile devices Or is this desktop only profiling support If not supporting mobile devices, does anyone know when there will be a released profiler for winmobile Unfortunately, I am still using the Embedded VC profiler from like 2002 and I'd love to upgrade if possible. Thanks! check out the following post... http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=843872&SiteID=1 Hope this helps. Thanks, Kathir ...Show All
Windows Forms WSUS Install Fails; There is a problem with this Windows Installer package.
I am trying to install WSUS on Windows Server 2003 R2 and the installer fails with the above error message. The log files are shown here: ********** **** 2006-06-01 14:29:15 13:29:15 Executing External Command: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -ir ***** ***** 2006-06-01 14:29:26 13:29:26 External Command Exited, Return Code: 0 ***** Running a transacted installation. Beginning the Install phase of the installation. See the contents of the log file for the C:\Program Files\Update Services\Setup\bin\Microsoft.UpdateServices.Setup.CustomActions.dll assembly's progress. The file is located at C:\Program Files\Update Services\LogFiles\WSUSCa_060601_1426.log. Installing assembly 'C:\Program F ...Show All
Software Development for Windows Vista How to update the rules without recompiling or redeploying an application
Hi, I am having Xoml file with rule conditions. Anybody help me how can I update the Declarative Rule Condition without redeploying. I got an External Toolkit to update the RuleSet, but I can't find any tool for updating RuleConditions. I got the information from one of the site( http://www.odetocode.com/Articles/458.aspx ) regarding updating the rules that we could store workflow and rule definitions inside of database records, and update the rules without recompiling or redeploying an application. Please help me if any body having tool or sample code for storing and updating the rules as said above. Thank you Satya Hi pavan, I have tried to import the .rules file which is having only RuleDefinitions instead of RuleS ...Show All
Visual Basic Sample CreateWindowEx API
Hi Everyone again, finally, i got how to replace the start button of xp. u need to call 2 api's: findwindowex and createwindowex. and i got a question on the 2nd one: visual basic code: Hi, this is not what i need. i need to use the findwindow and createwindowex api calls. with them i can replace the start button, the only thing i need to know is how to define the createwindowex to be able to use my form. ...Show All
SQL Server SQL 2005 with Sharepoint 2007
Hi Everyone, Im trying to install MS Sharepoint2007 and trying to connect to SQL Server 2005 , and i keep getting this error any advice Has any one came accross this problem of connection issue any one solved it even if i put the administrator username and password on the sql server it gives me this error. Ive even created a Northwind test database to see if it works but not a chance throws a error saying must delete all the fields 12/18/2006 14:47:09 8 INF Creating a new farm with config db SharePointCfg content db SharePoint_AdminContent_aca481f5-15ff-4a34-b57a-ca0db8ddd4bc server ...Show All
.NET Development Activator.CreateInstance(Type, args) issues with Nullable types
Hi, I'm trying to use Activator.CreateInstance(Type, args) and I have a null as the first item in the args. The constructor of the object takes a Nullable type of int , so it is a valid argument. The weird thing is that I get this error: System.InvalidCastException: Object cannot be cast from DBNull to other types. I'm not passing a DBNull, just a regular null. If I change the constructor type to int, then the null gets passed into the constructor as a 0. Is there anything I can do besides check for 0 in the constructor and set it to null If this is truly a .NET 2.0 bug, how do I report it Thanks! I tried your code and it worked, so I went back and created a test with my class and i ...Show All
SQL Server reporting services and mozilla
would someone know what i should to to make my report display in mozilla. I have added a textbox at the bottom of the reports' layout and this only helps a little because only the firts page of the report shows clearly in mozilla. The rest of the pages appear squashed to the left in the mozilla browser. This is due to a bug in Mozilla code. For your reference: https://bugzilla.mozilla.org/show_bug.cgi id=350506 We are investigating a possible workaround which may be available in SP2. Stay tuned. -Chris ...Show All
Software Development for Windows Vista How to obtain IDiscRecorder2Ex interface?
I'm using code such as the following to obtain an IDiscRecorder2 interface: IDiscRecorder2* pIDiscRecorder2; CoCreateInstance(CLSID_MsftDiscRecorder2, NULL, CLSCTX_LOCAL_SERVER, IID_IDiscRecorder2, (void**)&pIDiscRecorder2); Presumably, to obtain an IDiscRecorder2Ex interface, I would substitute CLSID_MsftDiscRecorder2Ex and IID_IDiscRecorder2Ex. This does not compile, as CLSID_MsftDiscRecorder2Ex is undefined (using SDK for July TCP). I have been able to obtain an IDiscRecorder2Ex interface pointer via QueryInterface off the pIDiscRecorder2 above. Is this an implementation artifact, or is this the intended procedure Also, what is the recommended context to create IMAPI2 objects Both CLS ...Show All
.NET Development bunch of asp.net web service questions
I hope this is the right place to post this so here goes....i want to make a web service that has a login page...it should get its username/pass authentication from active directory, the web app then needs to be able to run some shell procs in multiple domains...so far i have the shell proc running in a single domain. I was hoping there might be some sort of way i can create a session that will pass authentication to the machine my proc is targeted at, so it can access the data it needs. Im just wondering about a way to go about this. uber thanx, im a total n00b to this stuff Hi, For steps 2, and 3 mentioned above, the following may help you. In Systems.web section of the web.config, <authen ...Show All
Software Development for Windows Vista Implement Custom Container Activity
I would like to know if the following is possible (I am using the WF release canidate). I would like to create a custom activity that is a container activity (such as the built in while activity and sequence activity where you can drop other activities into the activity). The point of this activity is to allow the user, through me hosting the designer, to drop other of my custom activities into this container. The other thing I would like to do is restrict which of the custom activites they can put into the container (like how the handle external event activity requires that the first activity have certain characteristics). Can I do this If so, what is the best method of approaching this problem. Thanks. Amanda ...Show All
Visual Basic The Instruction at Referenced Memory at (XXX) referenced memort at "xxxx" The Memory Could not Be Read
Hi, I have migrated a VB6 application using VS2005 upgrade wizard. The application is running but while closing the application I am getting the error "The Instruction at Referenced Memory at (XXX) referenced memort at "xxxx" The Memory Could not Be Read" Please help me to resolve the error. regards Mano To attach the debugger follow the following steps: Run your application outside of visual studio. Launch visual studio. Go to Tools/Attach to Process Click on select and make sure that only native is selected. Select your application from the list. Click attach Go to Debu/Exceptions Make sure Win32 Exceptions under the "Thrown" ...Show All
Visual Studio 2008 (Pre-release) How to apply behavior configuration section in app.config/web.config while coding
Hi All: I will create a ServiceHost, the problem is how to apply "returnFaults" behavior section The configuraiotn section: <behaviors> <serviceBehaviors> <behavior name="returnFaults"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"> </behavior> <serviceBehaviors> <behaviors> Thanks, Zhihao In that case, you can just do the same thing imperatively, e.g. ServiceMetadataBehavior smb = new ServiceMetadataBehavior(); smb.HttpGetEnabled = true; host.Description.Behaviors.Add(smb); host.Description.Behaviors.Find<ServiceDebugBehavior>().IncludeEx ...Show All
