ReneeC's Q&A profile
Visual C++ definition of dllimport function not allowed
wrapi.h ... #include "WRAPIExports.h" ... .... //macros #ifdef WRAPI_EXPORTS #define WRAPI __declspec(dllexport) #else #define WRAPI __declspec(dllimport) #endif ..... HRESULT EnumerateDevices(WRAPI_NDIS_DEVICE **ppDeviceList, long *plItems); ... .... ////////////////////////////////////////////////////// wrapi.cpp ..... .... ... //exported function implementation WRAPI HRESULT WRAPIEnumerateDevices(WRAPI_NDIS_DEVICE **ppDeviceList, long *plItems) { return theApp.EnumerateDevices(ppDeviceList, plItems); } ////////////////////////////////////////////////////////// WRAPIExports.h .... .... #ifdef WRAPI_EXPORTS #define WRAPI __declspec(dllexport) #else #define WRAPI __declspec(dllimport) #endif .... ... //exported functions WRA ...Show All
Visual Studio Express Editions About Mutex veriable
Hi, I have a problem in mutex veriables Actually I want to create a mutex variable and use it in another aplliaction which I have to run from current application. So How should I create the mutex variable and use that in other application and also how should I run another exe from a current application Pls help me out waiting for reply Thanks, Nilesh The following should work, the idea is pick a name for your mutex, then each application attempts to open a mutex with that name, if the mutex cannot be opened then assume it has not been created and create it instead. Named mutex's are global kernel objects so are accessible from multiple applications. const char* conMTXNAME = "MyMutex"; ...Show All
.NET Development Report
Dear Microsof governing body, I would like to report a member of the NET Msn Passport, member name: amerno_4179. This following user has repeatedly insulted my country of origin, has shown racist remarks and has been a constant troll. I report him to higher power in hope that he will have his priveladges removed from him because he has been threatining and abusing respected members of NET. I wish of his rights to be removed. He is clearly a racist and pathetic individual who deserves no rights of access to NET and certainly should not be casuing hatred to members of NET. Attached File: Insult - Amer _4179. ...Show All
SQL Server SSIS - Connection String Issue
Hi I have been trying to resolve a connection string issue all day, and havent figured out whats the problem. I keep getting the Acquire Connection error everytime I run my package. Can you someone review the format of my connection string, and confirm that it is indeed the correct format: I have two conn strings specified in my config file, one is to connect to a remote database and one is for local. I have validated the connectivity from my server to these databases via Management Studio, and it seems to connect fine. But when I run my package it keeps failing. SQL Server Authentication(Remote Database Server): Data Source=server_name;Username=useraccount;Password=xxxxx;Initial Catalog=dbname;Provider=SQLNCLI.1; Window ...Show All
SQL Server Bulk Insert fails. Column is too long in the data file
Hi, for testing purposes I'm inserting a flat file into a sql-server table using BULK INSERT unsig the following code: BULK INSERT rsk_staging FROM 'c:\temp\bulk\rsk.txt' WITH ( FIELDTERMINATOR = '\n', ROWTERMINATOR = '\r\n', CODEPAGE = 'RAW', DATAFILETYPE = 'char', BATCHSIZE = 100000, ROWS_PER_BATCH = 1925604, TABLOCK ) I have two versions of "rsk.txt" one with 1.9mill rows and one with the first 2000 rows only. The files have one column only with 115 characters that I'll split in to several columns later using SUBSTRING. The one with 2000 rows fires in to the database with ...Show All
SQL Server Alternative for Cursor use
I am having a table that has a column called sequence which stores the sequence of Chapter and can be changed by user.Sequenece can vary from 1 to n. Structure of table is Id int CourseId int Chapter varchar Sequence int and sample data is Id CourseId Name Sequence 1 92 Chap1 1 2 92 Chap2 2 3 92 chap3 3 Now, when i delete second record i.e. Id=2, I want that sequence of Id=3 should become 2. For this I am using cursor. CREATE TRIGGER [Et_TriggerReOrder] ON [dbo].[ET_CourseChapter] FOR DELETE AS BEGIN DECLARE @id as integer DECLARE @Sequence as int DECLARE @Count as int DECLARE REorder_cursor CURSOR FOR SELECT [id], [Sequence] FROM ET_CourseChapter WHERE courseid = (select courseid from deleted) order by [Sequence] OPEN REorder_cursor FET ...Show All
Visual C++ Floating point stack overflow
My application works fine in VS2003, but in VS2005, it is producing an overflow of the floating point stack. This seems like it must be a code generation error in the new compiler. Has anyone else experienced this problem In the particular case I am looking at, I step through the instruction FLDZ in the disassembly window. Instead of getting a zero in ST(0), I get 1#IND, and the SF and C1 bits are set in the x87 FPU Status Word. The first time through this code it works OK, but this second time through, the FPU tags register shows that the stack is full before the FLDZ instruction. Let me put some of my codes here to describe the problem: DOUBLE tempAngle = 0; DOUBLE one_minus_cosine, cosine ...Show All
Visual Basic CheckBox_Click Name
Private Sub ExcluyeOC( ByVal sender As Object , ByVal e As System.EventArgs) Handles CheckBox1.Click, _ CheckBox10.Click, CheckBox11.Click, CheckBox12.Click, CheckBox2.Click, CheckBox3.Click, CheckBox4.Click, _ CheckBox5.Click, CheckBox6.Click, CheckBox7.Click, CheckBox8.Click, CheckBox9.Click, CheckBox10.Click, _ CheckBox11.Click, CheckBox12.Click Me .strExOC.Add( Me .Controls( "txtNumOC" & Mid( Me .ActiveControl.Name, 9)).Text) Call LlenarContraRecibo() Then I need to set the Checked = True of the CheckBox that fired this procedure. How can I do this I dont know wich one of the 12 CheckBoxes did the job, How can I know :) I see people here that suggest to put everything i ...Show All
Visual Studio Team System unique field
My web application having program name as unique field. Same program name should not be used by multiple numbers. While doing load testing I will record with program name as Program1 and generated the web test. When I am calling this web test in my load test with 10 users all 10 users will try to create the program name as program 1. at this time validation message will come that program name entered is already exit in database. Pls choose another name. Like this unique scenarios how to test load testing Pls let me know how to perform load testing in this case. is it possible to create data driven test that every time when it is creating program it should take new name is it the right way what is the ...Show All
.NET Development Fill dataset
Hi! I need to fill a dataset from lines of text that I pull from a tab-delimited text file. I think I need to first create a datatable to define what gets loaded into the dataset. Eventually, this data will have to go into a pre-existing database. How do I iterate each line from the streamreader into my datatable Thanks! sure. this will be tricky, I guess you can do a split, something like: string[] firstRowOfData = theStreamReader.ReadLine().Split(new string[] { "," }, StringSplitOptions.None); this will split the current line string, into several items in the array (think of it like columns I guess) and the point of splitting will be the comma "," - which can be replaced by whatever identifie ...Show All
Software Development for Windows Vista How to assign task to user via rules and rulesets
Hello, I have a sequential workflow that uses custom activities and a custom tracking service to generate task lists. End users will monitor for and work their assigned tasks. Question - how to initially set the "Assigned To" on the task or custom activity at runtime based on workflow parameters or other app domain data, and the current task. Requirements Prefer to use rule sets / policies to stick with declarative model and allow on the fly changes to work flow instances. Possible Solutions Place a Policy Activity just before each custom "TaskGenerator" activity in the workflow...add rule(s) to determine initial assignee on the corresponding custom "TaskGenerator" activity. This seems aw ...Show All
Visual Studio Express Editions Map Network Printer
Does anyone know how to map a network printer in Visual Basic Express '05 I found it. After adding a reference to the IWshRuntimeLibrary by clicking Project\Add Reference\COM\WSHControllerLIbrary: Imports IWshRuntimeLibrary Public Class Form1 Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Variable As New WshNetwork Variable.AddWindowsPrinterConnection( "\\Server\Printer" ) oNet = Nothing End Sub End Class ...Show All
Visual Basic Inserting a line break in a literal string
I am just getting started with VB and I am sort of used to QuickBasic, and I wanted to open a text file such as "C:/File.txt" and add to it. I got the file open and all of its contents into a string, but I can't add line breaks to it. The line breaks display fine in a MsgBox command but I can't insert the line break string (which looks like two vertical lines) into a literal string. If I try to paste it into the VB Code window, it actually adds a line break just as if I had pressed Enter, and the symbols look different than the Shift + \ line ( | ). The program looks sort of like this: FileContents = My.Computer.FileSystem.ReadAllText("C:\File.txt") Now, a Sub for a button NewData = TextBox1.Text FileContents = FileCont ...Show All
Visual C++ Can I build a 32-bit application with 64-bit compiler tools
I'm working on a 32-bit application, and the build process takes very much time. Since 64-bit programs are usually faster than 32-bit ones, and I use the 64 version of XP, it would be great, I could build my project with 64-bit compiler tools. First I changed the executable file path in the VC++ directory settings from $(VCInstallDir)bin to $(VCInstallDir)bin\amd64, but it did not work. It seems the 64 bit compiler can only compile to 64-bit binary. Is there a way to speed up the compilation of a 32-bit application on a 64-bit system, that is able to run also 64-bit programs. Tbyte You may have right. I'm really in lack of experience of comparing 64-bit and 32-bit applications. Almost all of my programs ha ...Show All
Visual Studio Express Editions how some help fix my code?
'Create a new MailMessage object and specify the"From" and "To" addresses Dim Email As New System.Net.Mail.MailMessage(" From@abc.com ", " To@abc.com ") Email.Subject = "test subject" Email.Body = "this is a test" Dim mailClient As New System.Net.Mail.SmtpClient() 'This object stores the authentication values Dim basicAuthenticationInfo As _ New System.Net.NetworkCredential("username", "password") 'Put your own, or your ISPs, mail server name onthis next line mailClient.Host = "Mail.RemoteMailServer.com" mailClient.UseDefaultCredentials = False mailClient.Credentials = basicAuthenticationInfo ...Show All
