Mikael Pahmp's Q&A profile
Software Development for Windows Vista restoring all workflows from persisted storage
Within the WF runtime, i see runtime.GetWorkflow(Guid) and instance.Load(). However, the typical use of my app would be that the user turns it off occasionally (this would prompt me to call Unload() on all the workflows), and turns it back on (this would necessitate restoring all the persisted workflows) How do i ask the runtime to restore all the persisted workflows I don't see a: runtime.GetAllWorkflows() Is there a way to do this Thanks. No, in the case of runtime shutting down, it will in fact iterate on all loaded instances and use whatever persistence service in place to persist the insances before shutting down. We may look into making the runtime load instances on startup in fut ...Show All
Internet Explorer Development Accessing files on local drive from localhost
I use PHP or HTM files from my local web server (localhost) to view images from the local drive(s). This works fine in IE6. <img border="0" src=" file:///C:/Program%20Files/WallMaster/WallMaster%20Wallpaper.bmp " width="860" height="688"> IE7 does not "find" the file. "Properties" for the undisplayed file gives the file name, but nothing else - no url, size etc. Is there some setting I need to change Or am I condemned to have no access to my data Did you find an answer to this Juan I have been using local file system references to images for demos etc, and although I now see the error of my ways, and am switching over to http a ...Show All
Windows Forms Error : DataTable internal index is corrupted: '5'
Hi all I'm getting " DataTable internal index is corrupted: '5' this error when I'm modifying the content in a datatable. I'm running 4 threads at a time, and each thread executes a common method(one method for all threads). In that method I'm changing the Datatable , there I'm getting this error. Is there any problem with multiple threads accessing same table at a time Can Anybosy help me in this. Thanks in advacne What I am thinking is more than one thread is trying to modify the datatable at once causing the error. Try to lock (or synclock vb) the datatable so only one thread can modify the table at a time. Try something like this lock (YourDataTable) { // do something with the ...Show All
Visual Basic Pointer to an image in memory
I have bit a code where I need a intptr value for a byte array, and I have no idea how to get the pointer to the byte array. Dim myImage() As Byte = conv.GetImage image = Drawing.Image.FromHbitmap(<POINTER TO myImage>) I"m not even sure this will work, but an answer will help. Can anyone help me here Thanks. I might be wrong but .NET is a "safe" language, you do not have direct access to memory. Only C# has the unsafe keyword that let you play with memory. Here is a code that show how to copy the byte of an image to a byte array http://www.eggheadcafe.com/PrintSearchContent.asp LINKID=799 Don't forget to copy the array back to the image. ...Show All
Visual Studio 2008 (Pre-release) How to pass parameters to a DataBinding in XAML? - I want (need) to seed the construction of the DataBinding source object.
I have a set of generic (generalized) DataBinding source objects, each of which maps to a different UI control type (eg. collections for ComboBox, single value for checkbox, etc.). <CheckBox.IsChecked> <Binding Path="Value" Source="{StaticResource SingleValueBinder}" /> </CheckBox.IsChecked> or <ComboBox Name="MyCombo" Height="21" Margin="20,20,20,20" ItemsSource="{Binding Source={StaticResource ItemsSourceBinder}, Path=Values}" IsSynchronizedWithCurrentItem="True"> </ComboBox> These objects are basically serving as adaptors and internally map to a host of specific object values. I need someway to specify which of the unde ...Show All
Visual Studio 2008 (Pre-release) How to determine if you are in a regular app or XBAP?
I'm writing some control code that gets the parent Window. I'd like to be able to determine whether that Window is part of a normal Windows application or if I'm in the context of an XBAP. Is there a way to do this Check out the following property: System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed This should be true for an XBAP, and false for a standalone. - Imad ...Show All
Microsoft ISV Community Center Forums Commandbar ICon (Excel VBA )
I m making one AddIns for Excel. I have added a CommandBar. Now I can assign the ICon to CommabBar Using Pasteface method. But this is creating some Problem for me. So is there Any other way to assign Icon to Commandbar... You don't describe the problems you are having, so it's hard to make a sensible suggestion. In later versions of Office (2003 and perhaps 2002), you can modify the picture and mask propery of the button. In earlier versions you are stuck with pasteface, but you may be able to improve the quality of your image. The picture and mask technique is described in Professional Excel Development by Bullen, Bovey, and Green. This book is a must-have for any serious Excel developer. - Jon ------- Jon Peltier, Microso ...Show All
SQL Server Slow Report
As I sit here waiting for a test run of the report to complete, I'm forced to wonder why it's taking over 10 minutes... so far. The query itself, when run through Management Studio takes about 50 seconds, so why would it take over 10 minutes to generate the report It's the only query being run, and it's not doing anything especially tricky with the data. It's all actually being processed in the query, returning some counts and displaying them in a simple list. Any thoughts EDIT: I should mention that the query itself isn't very simple, so I can understand the query itself being slow... just not the report being 10 times slower than the query in management studio. Could you describe the report and the datas ...Show All
Visual Studio Rename file/item and Modify file/item content (VS SDK Interface)
Hi All, First is about renaming the file using IVsRunningDocumentTable::RenameDocument, can any of you give me or point me to a sample of implementing this method The second one, is there any way to modify (add, delete, etc) the content of a file using VS SDK interface (any kind of file; C#, XML, text file, etc) Thanks, I'm affraid I can't answer to the rest of your questions. Hope other guys will help you soon. Please, keep us informed about the first issue we discussed. Thanks! ...Show All
Game Technologies: DirectX, XNA, XACT, etc. MouseState.ScrollWheelValue always 0
Hi, I want to use the mouse scroll wheel to zoom. In the tutorials I have tried, MouseState.ScrollWheelValue works fine, but in my own test program it always returns 0. The main difference I can think of in my test program is that I am not using the Game class. Instead I create my own GraphicsDevice and use a standard System.Windows.Form. Is there any initialization I have to do for MouseState.ScrollWheelValue to work This is the code for reading mouse state. All of it works, except mouseState.ScrollWheelValue which always returns 0. MouseState mouseState = Mouse.GetState(); myMouseLocation = new Point(mouseState.X, mouseState.Y); myIsLeftButtonPressed = mouseState.LeftButton == ButtonState.Pressed; int currScrollWheelValue = m ...Show All
.NET Development error: c101008d
Hi all, I have the following minor but annoying error whenever I build my application for the first time after modifying its code . "Error 2 general error c101008d: Failed to write the updated manifest to the resource of file ".\Debug\eConsole.exe". The process cannot access the file because it is being used by another process. mt.exe " The building is fine for the second time. In other words, whenever I modify the code, I have to build it twice because the first time always generates the above error. This is true for both debuga and release versions. This is not a big deal, but just a bit annoying. Could anyone offer some tip to fix this Thanks, hz Use Handle from SysInternals to see what other ...Show All
.NET Development Asp classic to asp.net
Is it possiable for me to convert asp classic to asp.net Do I have to download something or change something because I have to modify a few pages that has been done in asp classes to asp.net. There is a whole forum dedicated to this area on the asp.net site: http://forums.asp.net/29/ShowForum.aspx ...Show All
Game Technologies: DirectX, XNA, XACT, etc. some simple noob question
Hi Well.. i learned c#.. and i said what the heck .. why not learn direct x.. and i have some problems understanding cerain things like: if i have like 30 meshs .. and the vertex buffer.. i have do render seperatly every mesh plus the vertexbuffer sorry if i sound crazy.. but.. need some help.. The normal way is to render each mesh with an own draw call. There are some tricks to render multiple objects with only one call but as you are a beginner you should not care to much about this now. With mesh you mean the mesh class In this case it manage the vertex buffers for you (create, fill, select, destroy). You only need to call “DrawSubset”. ...Show All
Software Development for Windows Vista UAC - Elevated Com Moniker
I'm trying to make a library that I write Vista compatible. UAC is proving a headache because my library writes and modifies data that needs to be shared across all users. So my writes and modifications cannot be virtualized. However, since my library is not a stand alone app itself, I can't specify that virtualization be disabled for the whole app. So . . . what I need is to request elevation credentials of the user on the fly when my library reaches the point of needing to do a file write. From my reading, the cleanest way to do this seemed to be to isolate my writes into a COM object and then use the Elevated COM Moniker techinque. My COM knowledge is spotty, but this didn't seem to complicated a project, so I've given it a go. Wi ...Show All
SQL Server XML Newbie - SQL 2K5
We've some XML docs coming in daily. Task is to load them into SQL Server tables. For each xml document, we need to find out the elements/attributes and create a table based on the elements and load the corresponding data into those tables. (Initially, we can use an existing table and then populate from xml document) Can somebody outline the steps in achieving the goal Can it be done using SQL Server alone or we need to use other technology like .NET Can it be automated completely using T-SQL Also, how do we use SQLXMLOLEDB.4.0 from SSIS to bring xml into SQL Server Any inputs are highly appreciated. Thanks, Siva. Hello, Check out Xml Bulkload functionality :http://msdn2.microsoft.com/en ...Show All
