asynchronuous functions do not work in a c# used by CVI application dll

Hello

I have an application written with CVI 9.0.1, who must interact with a dll c# 2010 (which has no window) through a CVI<->wrapper .net (created with the controller of the CVI useful .net).

This c# dll uses the functions asynchronuous, as NetworkStream.BeginRead () and EndRead() of an object of System.Net.Sockets.TcpClient for example.

These asynchronuous functions work very well when the c# dll is used by a c# application (with a main window) or the c# dll is converted into a stand-alone c# program (having a window with buttons, call its methods, just to try), but asynchronuous functions do not work when my c# dll is called by my CVI application (which is my goal) : execution remains inside the NetworkStream.BeginRead () for example (for the concerned thread).

NetworkStream.BeginRead () can be bypassed successfully by using the function alternator NetworkStream.Read () instead, but the c# dll uses any other asynchronuous functions which have no associated alternator function.

Here's some c# code (I don't have the source code of the Snmp object; got_trap() method is never called when asynchonuous calls do not work):

public void run() / / wire

{

SNMP snmp = null;

Try

{

SNMP = new Snmp (true);

SNMP. NotifyListenPort = 162;

SNMP. NotifyRegister (null, null, new NotifyCallback (got_trap), CB_DATA_);

isActive = true;

Timeout.Infinite;

}

...

}

Thinking it might be a problem with the window messages that could not be processed (in the c# dll), I tried to replace the Timeout.Infinite statement in the code where the management of asynchronuous are held, by a creation of window over my loop of messages in Win32 window, but asynchronuous functions do not work better (while my loop seems to process messages successfully) :

Form myForm = new Form(); an empty window

myForm.Show ();

int bRet;

MSG msg = new MSG();

While ((bRet = GetMessage (out msg, IntPtr.Zero, 0, 0))! = 0)

{

If (bRet == - 1).

{

handle the error and possibly out

}

on the other

{

Switch (msg.message)

{

default: / / everything else

TranslateMessage (Ref msg);

DispatchMessage (Ref msg);

break;

}

}

}

Any idea?

Thank you

rvfr.

Solved: in fact, the Assembly of snmp I used just need to be registered dotNet.

rvfr.

Tags: NI Software

Similar Questions

  • I want to record with &lt; alt &gt; &lt; s &gt; in the Exact program online. This function does not work. This is the first time I use this program with firefox.

    Question
    I want to record with < alt > < s > in the Exact program online. This function does not work. This is the first time I use this program with firefox.

    edit, escaped mod < s > in order to avoid the line through question

    A web page can be defined a "accesskey" for an item. Unlike IE/Chrome/Safari, who use the Alt key only, Firefox requires pressing Alt and Shift to activate the element. In other words, try

    ALT + SHIFT + S

    and see if it works.

    I don't know of any way to change this so that the change is not necessary. There may be an add-on?

  • Satellite Pro 6000; sleep function does not work after upgrade W98 SE to XP

    I bought a windows XP cd and installed on W98 on my Satellite Pro 6000. The sleep function does not work now. I probably need a software of Toshiba. What do I need? Where can I find? What is the order of installation?

    Hello

    All drivers Windows XP Home edition, tools and utilities you can find on Toshiba support page under http://eu.computers.toshiba-europe.com > support & downloads. You have old laptop model and because of this type of product, you choose option ARCHIVE.

    Order of the facilities is as follows:
    -Windows XP
    -Display driver
    -Audio driver
    Toshiba - common modules
    -SD Card host driver
    -SD Card Driver
    -BlueTooth Stack
    BlueTooth - Easy Connect
    -Mouse driver
    -Modem driver
    -LAN driver included with Windows XP
    -Infrared driver
    -Toshiba Power Saver
    Utilities - Toshiba
    Toshiba - post Mobile
    -Toshiba Console worm.
    -Toshiba Hotkey for display devices

    I hope that you will be able to install Windows XP Home edition successfully.

    Good luck!

  • curve adjustment function does not work

    Hi all

    I am trying to bend fitting, a graphic. but the curve adjustment function does not work. I get no output curve.

    which suggests to me u.

    Thank you

    You have been asked to view the code. We cannot solve the photos.

    Matrices X and Y are same length? Is a NaN value? What the output error say you?

    (Also note that in this case, it would be convenient if we don't need to wire x take a look at this idea!)

    This discussion is useless until you attach a real VI and data, so please.

  • My gesture control function does not work correctly there on and off automatically

    My gesture control function does not work correctly there on and off automatically

    which application you are using? try reinstalling the media gallery.

  • AUTO PLAYBACK FUNCTION DOES NOT WORK

    AUTO PLAYBACK FUNCTION DOES NOT WORK WITH MY ADOBE PHOTOSHOP 7

    Try to uninstall and reinstall the program.  If this does not work, then I suggest that you contact adobe at http://www.adobe.com/support/photoshop/support.  This doesn't seem to be a Vista problem - it sounds like a problem with Adobe Photoshop. Lorien - a - MCSE/MCSA/network + / A +.

  • The side-by-side function does not work correctly, windows overlap

    original title: sizing windows side-by-side

    The side-by-side function does not work correctly, windows overlap.  How do fix you this feature?

    Hello

    It is Aero Snap.  When you select a window how you "cutting" it in position?  You do not use the window key and the arrow left/right or are you drag / drop window?  If you drag / drop, using the keyboard shortcuts help to solve the problem?

    Kind regards
    Alex T.
    ~ 2007-2011 MVP Windows desktop experience ~

  • Windows will start, the screen starts flashing and then the screen say Logging Off, then restore the screen to the CTRL ALT DEL all other functions will not work.

    Start my computer, it will default to the CTRL ALT DEL screen.  After graduating in the login screen I enter the password.  Windows will start and then the screen starts flashing and the screen say Logging Off, then restore the screen to the CTRL ALT DEL I can boot into safe mode.  All other functions will not work.

    Thank you

    I guess you wanted to ask how to solve the problem. If then all in Safe Mode you can use system restore to set up Windows to a point when the problem did not exist.

  • Function keys not working do not after Windows 7 installation

    Function keys not working do not after Windows 7 installation. After I installed Windows 7 on a Sony VAIO laptop, the function (brightness, volume) keys stop working. is - anyone know how to fix this in windows 7? Thank you

    What can I do with this? I want to re install windows. ?

    Hello

    This thread offers you everything you need to install the right keyboard control drivers and utilities for your function keys working again:

    http://www.geek.com/forums/topic/Sony-VAIO-fn-keys-no-longer-work

    Don't forget to keep your model number of the laptop at hand for the page of the driver from the Sony site.

  • Right-click the folder or any other function does not work, and I don't have a sticky key...

    Right-click the folder or any other function does not work, and I don't have a sticky key...

    While I click right click in windows Explorer has stopped working... Help, please!

    A Virus Scan. Your PC can be infected. If you have not installed it, use MS Security Essentials if you have a genuine Version of Windows. It's free.

  • Win7 64 bit freezes & arrow function does not work, do not click to navigate anywhere

    Win7 64 bit PC crashes & arrow function does not work, do not click to navigate anywhere, exceptionally after being on ~ 2 + hrs. I can only turn off by pressing the power switch for about 5 seconds.

    Hello

    You did changes to the computer before the show?

    Method 1
    Step 1:
    I suggest to start the computer in safe mode and check if the problem persists.

    Start your computer in safe mode
    http://Windows.Microsoft.com/en-us/Windows7/start-your-computer-in-safe-mode

    Step 2:  If the problem is solved in safe mode, then I suggest you perform the clean boot and remove the program that is causing the problem.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135
    Note: Follow step 7 clean boot KB929135 article to reset the computer in normal mode.

    Method 2
    I suggest you try the steps from the following link:

    Optimize Windows 7 for better performance
    http://Windows.Microsoft.com/is-is/Windows7/optimize-Windows-7-for-better-performance

    Also provide an observer event logs.
    Open event viewer
    http://Windows.Microsoft.com/en-in/Windows7/open-Event-Viewer

  • pcap_loop() to winpcap function does not work in windows8 pro

    Hi all

    I have two windows machines 8, both are 32-bit computers. One is windows 8 and the other is windows 8 pro (version 6.2 Build: 9200).
    I run an application to capture the packets of winpcap. To do this I use dll like 'wpcap.dll, Packet.dll, pthreadVC.dll' and also 'npf.sys"pilot.
    Version of wpcap is "4.1.0.2980", I downloaded this dll from ' http://www.winpcap.org/ '.
    In windows 8 "pcap_loop()" pro machine function does not work, but in windows 8 OS base it works fine and I can able to capture the packets of winpcap.
    Everyone please help me solve this problem.
    I have already installed the update compatibility for windows 8 from 'http://support.microsoft.com/kb/2764462' in windows 8 pro machine, but it does not solve the issue.
    Thanks in advance.
    R VR

    Hello

    I would have you post your query in the MSDN Community because it caters to an audience of it professionals. Your question would be more out there

    http://social.msdn.Microsoft.com/forums/vstudio/en-us/home?Forum=vbgeneral

    You can also contact WinPcap for assistance in resolving this issue.

    If you have questions about Windows operating systems, help us on this forum.

  • Search function does not work in a document, all the ideas of solution?

    Nice day

    I use Adobe Acrobat Reader DC 2015 Release Version 2015.008.20082 l. Within the program I asked for updates, and he says that it is current.

    The "Search/search" function does not work even when I clearly see the word I'm looking. Any ideas?

    Thank you

    Meredith

    Hi Meredith,

    Please confirm if you are using Acrobat or Reader?

    Search function will not work if it is a pdf document scanned in image format, you must apply OCR on this file by using Acrobat to be able to search for text in the document.

    Kind regards
    Rahul

  • Remote control DVD "skip" function does not work for Blu - ray (Encore CS5) projects

    I graduated from SD to HD and I need help.

    I just finished my first project HD in CS5, he engraved on a Blu - ray disc and immediately encountered a problem: jump jump forward and backwards remote functions do not work. (I met several other problems on the road to get here, but I solved with the help of the manual and by browsing this forum ). In this project, I am doing exactly what I did in my previous SD projects (where this function works):

    1. In Encore CS5, I added "Chapter Points at intervals... ».
    2. On the timeline in the properties panel, I kept the default selection "Operations: all allowed" (which includes 'Search for chapter' in the menu 'The authorized user Operations').
    3. In the "Project Preview" window, by clicking on the "Next chapter" or "Previous chapter", the function is executed correctly.

    However, after burning the blu - ray disc and pressing the buttons "jump back" or "forward" on the remote (Panasonic DMP-BD65) Blu - ray player, the 'Operation not permitted' message. (This very remote button function works on all my SD projects).

    More background information: I use also marks chapter to the PrPro project related to Adobe Dynamic Link, chapter marker tips end Actions (Jeff The Focal Easy Guide to Adobe Encore DVD 2.0, pp. 178-180) and the Bill on the use of the 'fade to black' transition to avoid the second ~ 1 the gap between chapters in the Playlist of chapter I use to play all chapters.  This observation can be independent: in the monitor Panel, 'Step Forward' button with the Alt key does not move the CTI to the next GOP brand. The work of functions (without pressing the Alt key) 'Step Forward' or 'Step backward' (move a frame CTI)...

    At this point, I desperately need help from the Forum.

    Thank you

    -Laci.

    Still must properly set the interval even chapters after the transcoding.

    You must say to "Return to the Original" If you do not want retranscode.

    Let us know on the chapter playlist in blurary: I think you will find that they do not work. Blu - ray, you must use the method used for SD cards.

  • Print function does not work

    I have Firefox 8.0.1 in a 13 inch 2011 MacBookPro using OS 10.7.2
    When I ask to print by clicking on print on the Manu (or in any other way), print screen dialog box, but the document is empty. This happens every time, not occasionally. However, I can sometimes get a future dialogue box telling me that a Java script does not work correctly. I give myself the option of this window to press 'continue', but it does not work. I tried to go into 'Applications' and delete 'Firefox.app"to download, then install it in not new, but it does solve the problem. Can you think of another solution? I should add that my Safari browser prints correctly so the problem must be with the software Firefox uses to connect to the printer driver.

    Hi debrigard,

    Have you looked at the article Knowledge Base, solve the printing problems in Firefox? There is some good information in there troubleshooting. I suggest that you try to reset the print settings.

    Hope this helps!

Maybe you are looking for

  • INTELLECTUAL PROPERTY

    Can someone tell me how to set permanent IP address on my Photosmart 6510?  I lost my network connection whenever we have a power failure which is frequently. Windows 7. 64 bit.

  • How can I get rid of the malware Fraud.WindowsRecovery?

    Hello.  I was infected by this malware.  I did a system repair disc, I created, and a number of things, but this malware is persistent.  I can't see my folder, files, etc. Here is the information I found on this but it doesn't mean anything to me.  I

  • sending of the U8 and SGL to the same message - frame API

    Hello I use the frame API and want to send a message that contains the following information Length of the payload - 8 bytes (most likely) byte 0 - cmd ID byte 1 + 2 - ID of the unit Byte 3 - selection byte 4-7 - coefficient I have the first 4 bytes

  • Over 2 years factory restore, Windows 8 Gateway fails to validate Windows 8 from the bios encrypted

    Hi all. For two weeks now, I tried to help a veteran 84-year difficulty his virus infected Office Windows 8 Gateway (Walmart) age of 2 years old. The poor old man was a PC buyer first time when he bought this PC two years ago & didn't have understand

  • Disable unwanted default Vista shortcuts

    I need to disable all the shortcuts, + which come pre configured with Vista, but may not know how or where to do. These shortcuts are constantly fires incorrect key activation through a game, the applications being run in the background, eventually h