MCF To Replace Comm Callable?
Mar 9, 2009
I have been writing a COM callable assembly for my current solution allowing unmanaged code some access. I have just been told that I can now start using 3.5 of the framework having used 2.0 for some time.I then came across WCF and was wondering if I could use any of this to create my application api and allow access from anmanaged code.
View 1 Replies
ADVERTISEMENT
Dec 17, 2009
I have a solution which contains among other things a project which is COM callable.
I would like to put some breakpoints into this and step through it but VS tells me "The breakpoint will not currently be hit".
how I can step into a com callable?
View 1 Replies
Dec 1, 2009
This is a dumb question, but I just cant find an answer. I want to do something as simple as this in IronPython, something I did in asp.net vb.net to capture the id of a table displayed in a gridview or datagrid
iid = e.Item.Cells(2).Text
But I get "Tablecellcollection is not callable".
View 1 Replies
Sep 25, 2009
I have a project as part of my Windows Solution which is COM callable and auto registered when I run my application.
After running my Windows application I run a VB 6 application which references my com callable assembly.
I would like to step into this code but my breakpoints aren't hit at all.
View 2 Replies
Oct 14, 2010
I need to call functions of "well documented" C++ dlls from a VB6.0 application. how to create VB6.0 callable C++ wrapper.
View 3 Replies
Jul 13, 2009
I have created a COM callable assembly which consists of an Interface, a single class which implements the interface. In this case the implementation is a single method.I have registered the assembly, created a type library and added the assembly to the GAC.I thought about opening an Office application like WORD or EXCEL 2003 and trying it from there but beyong referencing the COM assembly I have no idea how to code it.
View 1 Replies
Sep 21, 2010
I need to create a DLL that's callable from C, that executes database queries and returns results. The first tool I reached for was VB, and I found it easy to create a DLL, but when I view the DLL using dumpbin /exports, I don't see any functions.
So, my questions:
1) Is VB the right tool for the job? If not, (The ideal solution would be a 3rd-party DLL that will let me do database queries -- a friendly higher-level wrapper above ODBC. I've searched around and come up empty, but maybe I haven't looked in the right place).
2) If VB is the right tool for the job, how do I export a class method so that it's callable as a function in a legacy C environment?
More details:
1) The target environment is Mercury Loadrunner VUGen. It's able to import DLLs and make function calls, but the environment is (non-.NET) legacy C.
2) My development environment is MS Visual Studio 2008
View 2 Replies
Sep 6, 2009
My windows application needs to raise an event in a COM callable assembly so unmanaged code can pick up on the event.I am sick of this. All the crazy tags required for COM callable is doing my head in.
View 1 Replies
Jan 27, 2010
Basically I need to send the hex command FA through a COM port.
I have added the com port and set the baud etc and all seems to be working well there. I am just a little unsure how to send the correct hexadecimal command. For example,
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SerialPort1.Open()
[Code].....
View 4 Replies
Jul 15, 2009
What are the possible handshaking protocol available using COMM-DRV for communication through MODEM
View 5 Replies
Apr 29, 2011
Is it possible to create a logical serical port in vb that another application can open and read/write to?
View 2 Replies
Nov 2, 2011
I currently have software that sends out plain text(i.e. 'X') to comm 1 port and was wondering if there was any way to capture that plain text and also respond to that port on the same compute as the port without having anything plugged into the machine (i.e. 9 pin serial cable). I am trying to avoid buy any more hardware as this is an objective to acutally cut down on hardware.
View 1 Replies
Jun 20, 2012
We working with a Modem type interface that use's the Comm port for two way communication. The App starts and sets up the Comm port, and sends config info to the 'Modem'. Trick here is you have specific timing issues that need to be considered, and we got it all sorted, by using Threading.
You send The Config command to the modem and wait X ms for the confirmation reply (Single Byte), If no reply, send a Wake up command, wait X ms and send Config command again. Once confirmed that the modem is in config mode, send parameters, Waiting for confirmation of each one. Once config is set, send the 'Return to normal mode' command and wait for confirmation. [Code]
The SwitchModemMode sub runs under the Comms thread and not the main thread, like the Checkmodem sub at the top. Mostly because the Comms thread Raises the Data Event, which in turn calls the SwitchModemMode. Now because of that the Thread that is supposed to be checking for the input and setting the Flag, is actually the one waiting for the Flag to be set. And Yes App.DoEvents could solve it here, however that can/will mess with the Timing needed with these commands. I'm looking for how to pass the Raised event to the Main thread.
View 1 Replies
Nov 27, 2011
I used microsoft com control 6.0 in the application for sending data to the led control
MSComm1.EOFEnable = True
MSComm1.SThreshold = 100
MSComm1.InputLen = 0
[code].....
View 1 Replies
Dec 31, 2009
Now I know whats going to happen, I will post a request for code syntax and one of the admins is going to say that I need to post the code I already have. The code I already have is irrelevant to what i wish to do. So, continuing on; I have a micro controller that i wish to send commands to it in HEX data type. Communication is via the serial port RS232. (well technically its through the USB to serial converter)Steps:
1) Sending a "001" tells the micro controller to await instructions as to what to set the duty cycle to
2) The data that follows i.e." 050, 010, 185 " will be added to 400 (by the micro controller) to come up with a duty cycle based on a 10 bit resolution of 0-1024. I am only going to be using the range of 401- ~500.
I can communicate with the micro controller via hyper terminal. Using the Alt + #keys method I can transmit data to the micro controller, and this is what i with to do with vb.net.[code]
View 4 Replies
Feb 22, 2007
I have an older VB6 application which uses a scanner on the COMM port and does the following... (I have been tasked with re-writing it in ASP.NET (VB)...
OLD APPLICATION...
1. reads a Scanner and loads the data onto the PC
2. FTP's the data file to a SQL Server (where a small app picks it up and processes it)
3. Deletes the data from the scanner[code]...
View 6 Replies
Jan 21, 2010
I have a thread executing the following:
vb
Do UpdateVis()
System.Threading.Thread.Sleep(Interval)
Loop
UpdateVis is as follows:
[Code]...
View 3 Replies
May 3, 2006
I'm debugging a VB app where I'm using a comm port attached to a bluetooth radio paired to another bluetooth radio in order to communicate with a remote barcode scanner. The pair of bluetoooth devices basically work as a serial cable replacement. Sometimes it works fine, but after a while I get an UnauthorizedAccessException message which breaks the program (see attached jpeg).
I only get this when I use the radios and not when I use a direct cable. I wonder if it has something to do with other bluetooth devices nearby trying to communicate with mine. I've used the .NET Framework 2.0 Confuration tool to adjust the zone security to give full trust to MyComputer, so I don't think it has to do with security, but I'm really going beyond my area of expertise here. I don't know what's going on.
[Code]...
View 2 Replies
Apr 8, 2010
I did a search for "How do I implement Serial COM Port communications? and found a response by Xiaoyun Li which was last posted on April 10, 2009. Xiaoyun's response included sample code. My intent has been to get a clean compile on the sample code, then test it, then expand the code into a real application. I am down to a single error message, which I can't figure out how to resolve: "Method 'Public Sub DoUpdate()' does not have a signature compatible with delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)'." [code]I marked where the error occurs in the code with *** to the right of the error line.The code is attached to a simple form, Form1 which contains a single text box, TextBox1.It appears to me that the code needs a Delegate statement, but I can't figure out how to code it or where to put it.d.
View 3 Replies
Apr 13, 2012
I am getting scale values from a comm port into a richtextbox control, now as long as the connections and the scale is working great scale readings continuously flow into the control all the time, however when the connections or the scale is turned of the label that displays the weight will give a message saying error.
After 5 seconds I want to be able to give the operator the choice to take scale readings manually. This is my code so far.
Private Sub tmScaleTimer_Tick(sender As System.Object, e As System.EventArgs) Handles tmScaleTimer.Tick
If rtbDisplay.Text.Length = i Then
[Code].....
how do I restart the timer if the interval has elapsed
View 1 Replies
Apr 11, 2011
May I know instead of using WriteLine(MyTextBox.Text) to send data to a serial port, how do I send character by character? Use BaseStream.Write?
Now:
Dim ComLine As Ports.SerialPort
ComLine.WriteLine(MyTextBox.Text)
View 3 Replies
Feb 9, 2010
I am writing a VB.NET app that has a piece which needs to send a small command to comm port 2 and get the return result. The problem is .NET doesnt have any support for serial communication seems like.
I just need to send the command "headtype" and get the result.
View 2 Replies
May 18, 2010
I have recently developed a serial port communication program to access my hardware firewall and its connected to the device via a converter usb to rs232head plugged to a rs232 to an ethernet cable. this ethernet cable then plugs into the device console port.
my program functions similar to that of TeraTerm. an opensource hyperterminal program written in C++ but i decided to do one for vb.net
Alright to cut the story short, i have successfully coded out the program to accept incomming data from the device but however, i'm also receiving ansi escape sequence along with it and i have no idea how i could implement codes to remove these. i have spend 3 weeks trying to look for vt100 emulation codes written in vb.net but i found none so far. most are written in c++. here's an image to illustrate the problem which im facing.
The image below is a screenshot taken when the i ran both the programs together. The bottom is tera term 3.1 and the top is my vb project which i made using msdn's example and improved on the codes. basically tera term was able to interpret those escape sequence and display accordingly to that of the vt100 terminal display. I have spent time reading on regular expressions using the inbuilt function regex in visual basic and tried parsing some strings but its not working. i guess its far more complex than i thought.
View 6 Replies
May 5, 2009
The file reads in parameters and two of the parameters used to be in Date Format YYYYMMDD but will now permanently be in format YYYY-MM-DD. This change, I believe, is stopping the import of the file from working. I would like to replace the new format YYYY-MM-DD back to YYYYMMDD in the code. If possible I'd also like to see some output so I know that the old format has been replaced with the new format. The code is below. I added the two rows with .replace code in green in expecting that to be enough but it is still not working.
Public
Sub Main()
Dim R1, O1, P1, C1, strDateFrom, strDateTo, strRunDate
As
String
[CODE]...
View 3 Replies
Dec 8, 2008
I'm working on a timekeeping application in Visual Basic 2008 and am having trouble formatting a timespan for display. Here's how I want to the information:If a positive number my Label will be: lblTimespan.txt will show as "12 Hours And 15 Minutes" This works fine.If its a negative number I want to display it as "(12 Hours And 15 Minutes)'[ in red. The problem is that I can't get rid of the minus sign. [code] Thr Replace doesn't seem to want to replace the "-", can anyone suggest what to do?
View 2 Replies
Dec 9, 2011
I have a bunch of object variables which are all initialised in their declarations such that:
Private _myObject As New ThisObject("SomeString")
where ThisObject is one of a number of object types, but all are initialised using a string.
I would like to use the Visual Studio Find/Replace dialog box to search for "As New" then replace everything from "As New" to the first set of speech marks with some text such that:
EDIT
My original example could be solved using other methods. This example is more representative of the actual problem:
Private _myObjectA As New ThisObjectA("SomeString")
Private _myObjectLongName As New ThisObjectLongName("SomeString")
[Code]....
View 2 Replies
Jul 13, 2009
I am trying to think of a regex replace to replace double quotes with nothing. Example:
hello("hi there") would become hello(hi there)
"hi" would become hi
"example "3" would become example "3
-edit Maybe an easier way to explain this is, replace all " that do not have a backslash before them.
View 6 Replies
Mar 10, 2009
I am trying to filter out all unwanted characters from a string. All I want in the string is letters A-Z, numbers 0-9 as well as comma (,) plus (+) and quotes (").I figured how to do the letters and numbers, but the 3 special characters are giving me a problem. I also tried with the Chr(34) equivelant for the " sign, but no luck, as and " or , messes up the way the code is read. Here�s what I have so far, but it only works for A-Z and 0-9:
STR = System.Text.RegularExpressions.Regex.Replace(STR, "[^A-Z, 0-9, Chr(43) ]", "")
View 4 Replies
Mar 6, 2010
How can I specify in my string that I want to replace occurrences of ALL characters and replace them with a specified character? Something like this:
'assuming currentWord is a string that contains any word
_myWord = CurrentWord.Replace("a-z,A-Z", "*")
View 3 Replies
Jul 7, 2011
I am using replace function to replace a character in the file
sw.WriteLine(Regex.Replace(strLine, "\", Chr(13)))
This code is working fine, but now I want to replace two times and I want to use the replace function twice. Something like this, but it is not working . Can anyone tell me how to use Replace function multiple times?
sw.WriteLine(Regex.Replace(strLine, "\", Chr(13)).Replace(strLine, Chr(13), ""))
View 2 Replies