jschroeder's Q&A profile
Visual C# PInvokeStackImbalance was detected
Hi, I keep getting this error when I try to run my project from the IDE.This does not happen when running the exe. The details specify that the Stack Imbalance was detected in a third party dll which I am using. How can I fix this. Thanks, tribal A call to PInvoke function ThirdPartyDll!Namespace.ClassName.NativeMethods::ImageList_DrawEx' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature. It's because a Managed Debugging Assistant has detected an error. Since the error is in a third party dll you have to talk ...Show All
Visual C# windows service receiving message from database
I am trying to replicate data between sybase and sql server tables, I created a service to polling the tables in one side to see if there is new data, and replicate it if there is. It works, but I don't like the timer polling mechnism, is that possible when new data inserted into the tables in one side, a message is sent to the service, and then the service can go to the tables to replicate data thanks in advance Thanks for your reply. Your suggestion works if I replicate data between two sql server 2005 database. But I am trying to replicate between a sybase and a sql server 2005 database, trigger in sybase can not call the clr stored proc. ...Show All
Gadgets System.Network.Wireless Not Working
It seems like System.Network.Wireless doesn't work... I have tried a few Windows Vista Sidebar gadets that use it and non of them work. I have also tried creating my own gadet and it doesn't work either. Has the object refrence been update but not the documentation Has anyone else seen this issue Or am I just doing something wrong I tried the following to have it printed out on the gadget and also saved in the Event Log and both places show that nothing is outputted. (and before it is asked, yes I do have wireless that is what I am using to write this and dont even have a hard connection) var IPAddress = System.Network.Wireless.address; gadgetContent.innerText = IPAddress; System.Diagnostics.EventLog.writeEntry(&quo ...Show All
Visual Studio Team System Unit tests not run when building ASP.NET site
Hey. I just created a team build for an ASP.NET site with unit tests. However, the tests are not run and I'm not sure where to begin looking. Could anyone help me out The BuildLog.txt states: Target CoreTest: Creating directory "C:\DailyBuilds\Tove\ToveDailyBuild\BuildType\..\Sources\..\TestResults". __________________________________________________ Project "C:\DailyBuilds\Tove\ToveDailyBuild\BuildType\TFSBuild.proj" is building "C:\DailyBuilds\Tove\ToveDailyBuild\BuildType\TFSBuild.proj" (RunTestWithConfiguration target(s)): Target RunTestWithConfiguration: TestToolsTask MetadataFile="C:\DailyBuilds\Tove\ToveDailyBuild\BuildType\..\Sources\Ebutik\Ebutik.vsmdi" TestLists=& ...Show All
Game Technologies: DirectX, XNA, XACT, etc. how to use getcursorpos()? any example?
I wish to use getcursorpos to get the coordinate of the screen, the game i want to develop is a fullscreen game. Some error happened because i didn't pass any argument to this function, what argument shld i pass to this function, how to get the argument Why need to pass argument. Thanks POINT ptCursorPos; GetCursorPos(&ptCursorPos); // Now ptCursorPos has the mouse coordinates (screen coordinates) The function needs to return two values (x and y) so it can't do that -effeciently- through the return value. You pass it the address of a POINT struct and it will fill it for you... ...Show All
Software Development for Windows Vista Microsoft.DirectX.AudioVideoPlayback.Audio MEMORY LEAK?
Hi all! I'm using Microsoft.DirectX.AudioVideoPlayback.Audio to play mp3's using the following code: if (audioPlayer != null ) { audioPlayer.Dispose(); } audioPlayer = null ; audioPlayer = Microsoft.DirectX.AudioVideoPlayback. Audio .FromFile(fileToPlay, false ); audioPlayer.Ending += new EventHandler (audioPlayer_Ending); audioPlayer.CurrentPosition = 0; audioPlayer.Play(); So far, so good. When the mp3 ends, this code runs again. I read somewhere that you must dispose() this object due to some known memory leak issue. So as you can see above, it disposes before playing the next file. The problem is, both the Mem Usage as well as the VM Size keep growing and growing (up to ...Show All
Visual Basic printing multiple paged documents
I am trying to print a list from 4 arrays with the code below. The arrays all have the same number of items so that their indexed values are printed on the same line. There are 50 entries for each array. I want no more than 35 lines per page. I have run the code below as well as some variations of it, and I can only get one page with the first thirt-five lines printed. I can’t get the second page with the remaining 15 sets of information to print. Can someone give me a clue as to what I need to do print the complete set of lines, 35 on page one and 15 on page two Here is the code. Private Sub PrintCashGiftsButton_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintCashGiftsButton.Click ...Show All
SQL Server Unable to Access HTTP Endpoints from C# application when using Integrated security
I hope you can help me to solve my issue. I created an endpoint and have an application to consume the methods from endpoint. Every thing work fine when i use the Impersonation with specific user id and password. In other words i am using Authrentication method = windows and Impersonate = true, user id = "[DOMAIN\userid]" password = "password" in web.config. But this is not the way i want to use endpoints in my application. I want to make it work without any user id and password in Impersonate section of web.config. The end points must be accessible to user using their own credentials. By the way i am using Authentication = (Integrated) in Endpoint definition and the same in IIS. In my .net application i am using proxy.Credentiats = Syst ...Show All
.NET Development C# with Oracle
The location im currently working at is a cancer research centre in Canada. They use a large Oracle database for their data; however new software is coming into use here, and it is required that we are able to use SQL Server 2005. In doing this, we will need to have access to the Oracle database and the SQL database through C#. I know it can be done for SQL; but im curious if anyone knows anything about C# connectivity and data pulling from a Oracle database. Does anyone have any web resources in which we can use to help learn how to implement this. Thank you. Not sure why you do not have an answer yet...probably the potential size of the answer that may be required. The short answer is yes, no problem ...Show All
Smart Device Development using c# to develop handphone application
Hi expert, i am a user of VS 2005 standard ed. Is it possible for me to develop a hanphone application that can send SMS using VS 2005 if yes, then how can i do that and how can i install my application into the handphone Hope all the expert out there can help me on this....thanks in advance. you would need to install the Windows Mobile SDK's for PPC or smartphone (depending on the mobile device) and then create a new PPC/smartphone application project. The software can only be ran on a Windows powered mobile device. As well as this, the device needs to have the appropriate version of .NET CF (compact framework) on their device, maybe in this case .NET CF 2.0, to run the application. WM5 PPC SDK: http://www.microsoft.com/downlo ...Show All
.NET Development dll form behaving like an MDI Child form.
Hi all, Just wondering if there's a quick and easy way of doing this In VB 6, we use API call to made the dll form to behave like a child form of an MDI application. Do any one know of a way to do this in VB .NET I use reflection to call my dll which bring out a form. But this form behave like another separate entity. I want it to behave like a child form to the MDI application i called from. Seems like there's a way to do this in Delphi by passing in Application.Handle to the dll form. Just need some insight. Thanks for reading this far. Dan I had no trouble doing this, but didn't use reflection. Load your Windows Forms project, File + Add, New Project, pick the Windows Control library template. Add your n ...Show All
Visual Studio Express Editions Ready, Steady, Hang on a minute.
To give me a break from the program that I'm working on, I've decide to have a go at a simple game, (That's a laugh, my last program was a Simple combobox to show the fonts on my system, it' now about 5000 lines of code and 4Mb, and still going thanks to an extreme beta tester ) Anyway I thought I would do I twist on tetris, still blocks falling etc but before I start and go wandering off into a maze of code, only to come here and ask for you guys to pull me out I thought I would start with your ideas and opinions. Would it be better to have pitureboxes dropping or drawn rectangles or panels or what Is there any help or info out there that I could look at to get the basic idea. Should I stop now and forget it All advice welcome and appreci ...Show All
SQL Server Execute Process Task using StandardInputVariable
Greetings! I am using a Excute Process Task calling a selfwritten EXE and I'm trying to pass a command line argument to it. The code for the EXE is quit simple: Public Sub Main() Try Dim info As String = My.Application.CommandLineArgs.Item(0) MessageBox.Show("Info:" & info) Catch ex As Exception MessageBox.Show(ex.ToString) End Try End Sub According to the help files there are two ways to pass an argument, using the property Arguments, which I guess is for hard-coded stuff, and the StandardInputVariable for passing dynamic info. When I use the Arguments property everything works fine. I get the info messagebox with correct data. But when I leave that blank and instead use the StandardInputVariable proper ...Show All
Internet Explorer Development IE7 Start up problem
Hi, I am having problems starting IE7. When I start IE7 it hangs for ages, maybe a few minutes before starting then everything runs OK. I don't think IE7 is the problem because when I start my network connection (tiscali broadband) explorer hangs too and nothing will run until it clears itself, several minutes later. When I boot Windows (XPSP2) iexplorer.exe runs at boot and tries to connect to the internet but I have no applications that call this program at startup, (except maybe McAfee and JavaSun scheduler). I have checked the registry and it seems clear (as far as I can see!) I have tried running McAfee and AdAware but they dont find anything. Have even tried a rootkit analyser but it also says nothing amiss. It is as if a ...Show All
SQL Server Pie chart image distortion
I have created an aspx page with a report in Visual Web Developer 2005 Express using the report viewer control add-in. I have also created a report in SQL Server 2005 Reporting Services. In both when viewing the report in the web page the pie chart included in each report is distorted - it's still readable but it's sloppy looking. It is obvious to me that the pie chart is an image but I have not found a way to eliminate the distortion through any of the properties. Any clues Thanks in advance. The only thing I could find to do was to change the resolution of my laptop to a custom setting. I think the distortion occurred because my laptop has one of those new widescreens. ...Show All
