John Oliver (UK)MSP, VSIP's Q&A profile
Visual C# How to get returned String Array from C++ based DLL while called in C#(P/Invoke related)?
Hi, I am a newbie in this forum. I want to use VC++ to develop a dll and integrate it in C# I searched internet and get some information from MSDN. But I still don't know how to return a string array from dll to C#. Like this: in C++: extern "C" __declspec(dllexport) int myFunc(char *** varTemp) { *varTemp = new char*[10]; for(int i = 0; i < 10; i ++) { (*varTemp)[ i ] = new char[20]; ::strcpy((*varTemp)[ i ], "My Test"); } return 10; } in C# [DllImport("MyDLL.dll", EntryPoint="myFunc")] public static extern int myFunc(....); What shall I use to replace "...." Thx sinoapollo wrote: What shal ...Show All
Visual Studio Creating Graphical editors
Hi All, Im trying to evaluate the possibility of creating an xml editor for VS2005, the editor will need to open xml files but display it graphically, the xmls will represent workflows so the intended editor will look like the Visual studio orchestration editor for Biztalk. Basically i would like to know the following 1) Can i create this editor using C# 2) How complex would it be to create an editor similar to the orchestration editor for BizTalk 3) Any links to samples that would be of use. Any comments from your side is appreciated. Thanks ! Regs, Melvin You should have a look at the Domain Specific Language (DSL) support in VSIP, it has a steep learning curve but will do just what you wan ...Show All
SQL Server TableAdapter Insert with Try/Catch
Hi Guys, In ASP.NET 2, I have a webpage which uses the EditView control with an ObjectDataSource. Within the "Insert" functionality of the EditView control, I want to be able to trap the error if the user attempts to create a new record with an existing key. As the "insert" functionality is handled by the control, I can't see how to encapsulate it within a Try/Catch. I suspect it's got something to do with the "Update" button within the EditView "Insert" template, but am at a loss. Can anyone help Further to above: I've determined that I can create code for the "Inserted" method to determine if there was an error during the Insert ...Show All
Visual Studio 2008 (Pre-release) Updating custom control
I am working on an WPF media player control (for various reasons I cannot use MediaControl). I have the video up and running now, but I am in doubt if I am doing the right thing when it comes to updating the control. Currently I am calling InvalidateVisual on the control and then doing the drawing in OnRender, but I seem to remember that invalidate is very expensive. So, how should it be done Thanks for the link, at least I can see that I am not the only one tinkering with this kind of problem. The method described in the link is more or less what I am already doing (though I am using a modified Texture3D9 sample renderer instead of samplegrabber) but the renderering is tremendously slow. The proble ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Maya plugin
I would like to use the Maya plugin with Maya 8. Primarily, I would like to be able to assign FX files with the Hypershade and export to X files. Unfortunately, the December DirectX SDK only comes with Maya 6, 6.5, and 7 plugins. I got the plugin to compile by simply changing all the 7.0s into 8.0s in the project properties, but I get the following error when I attempt to load the plugin: DirectX Extensions for Maya - Error loading DXCC: Incompatable DXCC.DLL was loaded: C:\Program Files\Microsoft DirectX SDK (December 2006)\Utilities\Bin\x86\DXCC.DLL Desired DXCC.DLL is in path: C:\Program Files\Microsoft DirectX SDK (December 2006)\x86\DXCC.DLL DXCC.DLL exists at the 1st path that is mentioned, but not at the 2nd "desire ...Show All
Smart Device Development Detecting type of connection
Hi, is there any way to display to the user the connection he is using such as GPRS or WiFI Thanks in advance The recently released Mobile Client Software Factory contains the Connection Monitor Application Block that you can use for what you want: http://www.microsoft.com/downloads/details.aspx familyid=f9176708-9f57-4c0f-97fb-f9c65a9bbf22&displaylang=en ...Show All
Windows Forms Methods in windows service
Hi all, Just i've created windows service called "MYserv1" and controlled(like start and stop) it via VB.NET client apps. Now i want to write my own function calls in the windows service. i need to pass the parameters as well as need to get a return value from the function from/to normal windows client application. How to do it Most importantly,how can call those methods from client programs. Kindly advice me in this aspect. Thank U! Sorry, I was out of town for a long time. Thanks for your response. Unfortunately I have not solved the problem yet. I was thinking using ExecuteCustomCommand feature of Windows Service to call execute my application specific function. But that function ...Show All
SQL Server SSAS KPIs not showing up in Excel 2007
OK, I realize this isn't an Excel forum, but this is at least somewhat SSAS related. I've defined some KPIs in Analysis Services. However, I can't seem to get them to show up in Excel 2007. All the other measures and dimensions of the cube are there. The KPIs show up in the browser in BI Studio. Is there something I'm missing here It should just work, right Hello. I recommend deploying and processing the Adventure Works cube, sample BI-Project, where you have several KPI:s defined. I have used this cube in Excel 2007 and the KPI:s will show up. When you have established this, that you can see the Adventure Works KPI in Excel 2007, your problem can be about syntax or KPI-bounds that overlap. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. What is "title" means?
Is the "title" in "title storage" means "An identifying name" or "the game program" I think "title" means "the game program",but my friend insist "An identifying name". What does "title" mean Does the "title" in "title storage" mean "An identifying name" or "the game program" I think "title" means "the game program",but my friend insists "An identifying name". Sorry for solecism. ...Show All
Visual Studio Team System Build script
Hi! I have VSTS4DBPRO project (and bunch of other projects - SSIS, SSAS, C# - in my solution). And i need to create sql script wich should create database using my custom installation tool and supplied (by user of that tool) database server name, database name, physical layout (database files names and paths) options (assume that database has finite filegroups). Any workarounds how I must build my solution to achive desired result How could I get this by VSTS4DBPRO Hmmm... May be I don't have enough understanding of build process in DBPro... How can my installation tool can use Msbuild, then it runs at client machine wich doesn't have DBPro and there is nothing to build Or, may be, you meant s ...Show All
Game Technologies: DirectX, XNA, XACT, etc. HLSL & Alpha Blending help plz!
Hey all - I'm pretty new to XNA so I need some help with my Blending and HLSL stuff... Here's the setup: I'm trying to make a 2D game where the graphics are 2D but they're textures that have been placed onto polygons. So basically I'm using the 3D part of XNA to make the 2D game (because I want to have faster speed, rotation, scaling, better manipulation of the pixel colors, etc; making it this way because I also want a deeper than 2D playfield even though I'm using 2D graphics - and its actually working out well apart from the blending problems.) and I want to know how I can get the blending mode to be 'just right'. Basically the effect I'm going for is for Polygon textures to be opaque where there is color - and transparent where there i ...Show All
Visual C# Is it possible to integrate C++ file with C#
Dear All I want to integrate C++ file with C#'2003. Is it possible to do so i want to call few methods from C++ file and needs to be show outout in C#'2003. Please let me know is any way to do so. I'm very egarly waiting for your reply., Thanks & Regards KJ Balaji ...Show All
Visual Studio Team System Stopping Automated build if analysis detects errors
Hello I am attempting to automate my build process (using MSBuild). MSBuild is happily constructing my assemblies and I am calling FxCopCmd after this. FxCopCmd is running happily and generating an analysis report. I would like the build process to be able to detect when the FxCopCmd analysis has found problems. The exitcode returned from FxCopCmd is 0 (zero) so I can't use that. It appears that I will have to "post process" the output generated by FxCopCmd, looking for warnings and errors. Have I got this right This seems like more work than I was expecting. Do you have any tips on how to perform this "post processing" or have I missed something and there is an easy way for the build ...Show All
Visual Studio Visual Studio 2005 Addin
Hello I have an Addin with a toolWindow that works fine. In my ToolWindow I have a ToolStrip. Just my question is in rendering the thema of my toolstirp are differnet to other toolbars of VS2005. How can I render it as the other toolbars. Any idea appreciated. Thanks Mohsen The ToolStrip of Windows Forms and the toolbars of Visual Studio have nothing to do, they are different controls. So you have two options: - Adjust the properties of the toolstrip to have the same look & feel than the VS toolbars. I don't know exactly what is the rendering problem that you are talking about. As long as you use True Color images for the buttons, the ToolStrip should look quite good. - Use a VS SDK pac ...Show All
Game Technologies: DirectX, XNA, XACT, etc. The woes of boxed objects (and foreach)
Here's another post by someone who has learned everything through mistakes, not learning it right in the first place . :) I've been working on some nasty GC issues on Xbox360 for some time now, and through RPM and CLR Profiler I've started to make some sense of things, so I thought I'd let everyone in on my experience so that the next guy (or gal) with these issues can have some info. So here's the story: Remote Performance Monitor showed 240 boxed value types per delta. Having no idea how I was creating boxed objects (or what they are), I ran the CLR profiler--as it would happen, I had 4 foreach calls per frame--for a postprocessing effect. According to CLR Profiler, the foreach calls were creating System.Collections.Generic.List<T> ...Show All
