Scott Bellware's Q&A profile
.NET Development How to return an HRESULT from C# com interface implementation?
Hi all, I am using c# com interop to implement an MS provided com interface but to enable a particular feature, it appears that I must return a specific HRESULT value but I cannot do this because interop hides the return value; instead always returning success or translating an exception. The specific com interface is IMailTransportSubmission::OnMessageSubmission for exchange server using c# interop. See the docs refer to 'return value' which I understand to be the HRESULT since there are no retval arguments. http://msdn.microsoft.com/library/default.asp url=/library/en-us/smtpevt/html/331c223b-1fe4-4442-9cdc-4f00086645e4.asp Interop definition with no return value: void IMailTransportSubmission.OnMessageSubmission( MailMsg messag ...Show All
SQL Server Database Integrity Check
I have a database hosted that doesnt passes the integrity test. Here is the error it gives : Executing the query "USE [db_cs] failed with the following error: "Could not locate entry in sysdatabases for database 'db_cs'. No entry found with that name. Make sure that the name is entered correctly.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. Any idea whats wrong and how I can let the integrity test pass for this db. Thanks, Rubal Jain ...Show All
Visual C++ How can i Add Reference on Solution explorer?
Hi All, I could add the references in c# on the solution explorer, there is available one folder like "References" but in Vc++(MFC) there is not avail that folder, then how can i add references in my project. Currently i am using Visual studio 2005. Thanx in advance Hi stinosky , Thank you,but i can't add new reference that is when i clicked the "Add New Reference" button, there is shown "Add Reference" dialog,which have contain the "Project" tag,which contain "Project Name","Project Directory" and there is no references only in empty editor, then how can i add the new reference ...Show All
Smart Device Development Application loses focus when closing a Form - but only on one Form it happens...
Hi all, I have this strange problem/issue that I have had bothering me for a while now. I have an application where the users browses through Forms to perform various bits of functionality, and then closes the form to return back to the previous form (the Form from which it was openned), and the Focus is right back with the Form that openned the closed Form (if you know what I mean :)). Now this all works fine in my application apart from in one place, where when the called Form is closed, the calling form (or my Application even) doesn't get focus back until the 2nd tap on the application with the pen. The Windows start button and Input control on the MainMenu are focused and can be activated from the first click on them, but not my appli ...Show All
Visual Studio CrystalReports (View as Datasource) - Prompts login
Hi All, Im lost with this one. I have a vb.net application, once you click a tab I have a crystal reports viewer that has a report attached to it. Now on the dev machine it shows exactly what I expect. Yet when I run it on a clinet machine, when I hit the tab I get presented with a database login prompt with the correct server name present, an uneditable database field which is blank and it is requesting UserName and Password credentials. Even if I create a user with the appropriate select permission on the view and enter those credentials, It will repeatedly ask me to log in. I have tried many searches and not getting anywhere, is it possible someone may help I must add im using VS2005, and .Net 2.0... I have a crystal rep ...Show All
Visual Basic Migrating from vb6 to VB.Net (doevents)
Hello, I have a library that works well in vb6. But, I want to migrate to VB.Net. Its like my client application connects to the server and binds to it. (SMPP v3.4). I have SMPP states, 0=no active tcp connection, 1 = active tcp connection, 2 = active SMPP session and 3 = waiting for SMPP session establishment. Not, in vb6, I do something like, Do DoEvents Loop Until smpp.State <> 3 Now, in VB.Net, it becomes Do Windows.Forms.Application.DoEvents() Loop Until smpp.State <> 3 But, when I call this code, I get this error A callback was made on a garbage collected delegate of type 'SMPPlib!Project1.TBase+Delegate_zTimerEvent::Invoke'. This may cause application crashes, corruption and data loss. When passing delegate ...Show All
Smart Device Development How to continue using an application whilst waiting for a function to execute repetitively on a fixed interval
Hi i am ruuning the following extract of coding from visual basic 2005: __________________________________________ Dim start, finish As Double Do While DateTime.Now.Hour < 17 start = Microsoft.VisualBasic.DateAndTime.Timer ' Set end time for 30-second duration. finish = start + 30.0 Do While Microsoft.VisualBasic.DateAndTime.Timer < finish ' Wait a while before doing next action Loop call_a_function() ' Go off and do something then come back Loop ______________________________________________________ While the program falls into the "wait state" (2nd do while loop) the program stops me accessing anything else on the active form, like using a drop dow ...Show All
Windows Forms ClickOnce Workaround.
hey guys, I need help from you guys. Just a few questions if these can be dealt with. 1. Is it possible to use click once without its backward compatibility I mean would want the newly published files(all files) overwrite the old ones. Would it be possible 2. Just wanna hear your ideas on this guys. For example, we have multiple servers running. Considering a multinational compay that has employees on North America, Asia and Europe. Each continent is being represented by a server. The purpose of which is that every time theres an update, those employees from europe would just connect to the server on europe and so is USA and Asia with their assigned servers respectively. Would it be possible for ClickOnce to deploy to multiple servers ...Show All
Visual Studio 2008 (Pre-release) WCF and N-Tier Web applications
Hello, I would like to know how would WCF add value in a typical n-tier web application, where the presentation layer talks to the business logic layer in-proc for performance purposes. i.e. there's no physical seperation between all layers and hence the UI layer has access to the db server. Please note that web services are not always necessary as an additional layer as the main purpose of web services is to expose the application functionality to other consuming applications, and so decisions to make the contract coarse-grained is not valid since no network overhead is incurred. Please advice. Thank you, Well, WCF is designed for distributed applications. If your web app is not distributed ( ...Show All
Smart Device Development Program Hangs in VS2005/Device Emulator
I'm attempting to debug a project using Visual Studio 2005 and the Windows Mobile 5.0 Smartphone emulator. Everything was working ok - project was running etc, then for no apparent reason (no code or settings changes) the project now hangs as soon as it begins executing on the emulator. Also the program files and the test files I was using were no longer in the emulator's directory. Tried other projects(that all previously worked) - same result. Tried debugging my project and others on a device through VS 2005, all worked fine. To date I have tried... Uninstalling and re-installing the project via the emulator. Clearing the saved state. Soft re-setting the emulator. Hard re-setting the emulator. ...Show All
Smart Device Development Need to instantly detect socket disconnect.
I am developing a Pocket PC app which allows the user to take the PDA around a parking lot while entering information on a form and saving. When the Save button is clicked I want to not only save it to the PDA but send the information to a laptop sitting in the user's vehicle. This laptop listens for a connection request. I know how to transmit and receive files using sockets but I need to be able to instantly detect when the PDA has lost the connection with the laptop (losing the signal by putting a building in between the PDA and the laptop, for instance). I want the PDA to inform the user that the signal has been interrupted and keep trying to connect to the laptop before sending the file. As soon as the connection has been re-establish ...Show All
Visual Studio Determining if a project is unloaded
Hi, How do you use the DTE and object model to determine if a project is in an unloaded state Thanks, Joe Thank you, this solved the problem. I was wondering if there is an enum or documentation describing the possible GUID strings that can be returned by Kind. Thanks, Joe ...Show All
.NET Development Quiet Dialog Box
Is it possible to use MessageBox.Show without any sound effects, but only for this application Before this thread closes I ought to explain why I wanted this. It is of course that terrible reason - user request. Actually, it is the testers. Part of their job is to cause all possible sorts of failure. They get sick of the noise, but they want to keep the sound for all their other jobs / applications. ...Show All
Visual C++ Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded. error
I am writing a program, It works when I ran it without debugging, it compiles clean not errors, but when I ran it with start debugging I got this error: I am using: The error: ' project_4.exe': Loaded 'C:\Documents and Settings\rechever\My Documents\Visual Studio 2005\Projects\project_4\debug\project_4.exe', Symbols loaded. 'project_4.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded. 'project_4.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded. 'project_4.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll', Symbols loaded. 'project_4.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded. 'project_4.exe': Lo ...Show All
Visual Studio Team System workItem user id
Hi, I'm trying to integrate the workItem traking system with my database, so I need to get the users "IDs" out of the workItems objects like (changed by, Activated by ...). could you help me please Nobl you mean ...try to get the users ID's from the database... If so, the user details are stored in the database "TFSWarehouse" under this Person table which will get you all the details about the users and user id's and display name of the user..etc.. TFSWarehouse Persons __ID -> Person ID and to get the link like ChangedBy or Activated By ..you can get the info from the table "Current Work Item" under the TFSWarehouse database itself. In this table ...Show All
