Dynamic creation and tracing in CNiGraph

Hello

I would like to create a temporary object of CNiGraph, plot data and make a picture.  I am able to create the object dynamically (I think) but I get a runtime error when you try to plot data (using Idrsqu) on the graph.

The error is in the AfxGetAmbientActCtx function.

My code for creating control looks like:

CNiGraph niGraph;

CRect rect (CPoint (0, 0), m_Size); the size of the graphic

CDC * pDC is pWnd-> GetDC();.

BSTR bstrLic =:ysAllocStringLen (/ * stuff to generate the license * /);

niGraph.CreateControl ("CWGraph", "", WS_VISIBLE, rect, pWnd,)

m_staticControlID ++, NULL, FALSE, bstrLic);

Use static control ID to ensure unique IDs

:ysFreeString (bstrLic);

ChartPreviewData (niGraph, pList, settings);

... is the result of an untested for the rendering of an image code

pWnd is a CPropertySheet (a window is valid, but I use as a model to temporarily hold the chart).  ChartPreviewData for this...

void CXyzClass::ChartPreviewData)

CNiGraph & graphic,... a few other arguments...)

{
a code to get ready to put in the vector data OR

CNiReal64Vector niVector (numPoints, pBuffer);

Graph SetChartLength (numPoints);

The data graphic and set delta X to reflect the sampling frequency used

CNiPlot field = graphics. Plots.Add ();

parcel of land. MultiPlot = TRUE;

parcel of land. Charts (niVector, (double) 1 / pSeries-> GetFs());  crashes

Remove pBuffer;

}

When I scroll in the debugger, it looks like NiGraph gets created correct.  In fact, I can see from the dialog box.  However the call Idrsqu gives me a runtime error.  I suspect I'm missing something to do with ActiveX, but I don't know what.

Thank you, Nick

Sorry, it's resolved.  I had a stupid mistake and going on a vector of length zero to Idrsqu.

I discovered this way upward in the call stack an exception was thrown for this reason.

Tags: NI Software

Similar Questions

  • dynamic distribution and an order for various devices of construction

    I have a code that is written on a device. The device will be changed, but perform the same basic (frequency setting, power etc) commands. So, I wrote a dynamic dispatch VI that takes a command string predefined and written to the appropriate device based on what communication mechanism is used (SNMP, VISA, etc.). My question is related to the predefined command string that feeds this VI. I think that the creation of the chain of command VI should also be dynamic distribution and should build the command appropriate for the given device. But some devices might have several parameters required for the construction of this string (for example, snmp) and something like VISA may not be only one parameter. Dynamic distribution screw must have the same connector components, so what is the best way to handle this? I thought about having a class of 'settings' in the connector pane that holds all the specific parameters for a device. But it seems exaggerated to make a class for something like this, when a variant would do the trick as input. However, having a variant as it tends to make me think of distribution dynamic is not necessarily the right choice in the first place because you force a similar connector component.

    I also consider if some necessary inputs are, in fact, the State of the object and that it could be found in the object itself. This would reduce the connector pane entries and can mitigate some of these problems all together.

    Thoughts?

    for (imstuck) wrote:

    I also consider if some necessary inputs are, in fact, the State of the object and that it could be found in the object itself. This would reduce the connector pane entries and can mitigate some of these problems all together.

    That's what I'd do. Make settings of the object data, so when you then call the function to generate the dynamic distribution VI command string has all the right data available to it.

  • Hi friends this is the code for the dynamic creation of user in plsql, but these statements are not run if pls help for this error

    DECLARE

    n NUMBER.

    BEGIN

    n: = 1;

    WHILE (n < = 10)

    LOOP

    CREATE a user EM | IDENTIFIED BY KLU n;

    SESSION CREATION GRANT, GRANT ANY PRIVILEGE TO EM. n;

    COMMIT;

    n: = n + 1;

    END LOOP;

    END;

    Hello

    Here is the dynamic creation of user query and giving grants to the user,.

    DECLARE

    n NUMBER.

    cr_user VARCHAR2 (300);

    gr_user VARCHAR2 (300);

    BEGIN

    n: = 1;

    While (n<=>

    LOOP

    cr_user: = 'CREATE user EM | n | "IDENTIFIED BY KLU";

    gr_user: = "GRANT CREATE SESSION, GRANT ANY PRIVILEGE to EM '. n | '';

    EXECUTE IMMEDIATE cr_user;

    EXECUTE IMMEDIATE gr_user;

    n: = n + 1;

    END LOOP;

    END;

    Edited: Removed when OTHER exceptions to Code.

    See you soon!

  • Load a dynamic VI and keep in memory after execution

    Hi guys,.

    I use a strange setting that I have to follow a set of rules.

    My problem is the following:

    I have a main VI (which is compiled into an EXE file) that dynamically loads and executes a Subvi (the Subvi is not compiled into the EXE file). Calls Subvi has overall functional which is called only by dynamic screws, where the global is not a dependency of handmade VI and it is not compiled into the EXE file either. As you can see already, when I call my Subvi dynamic for the first time (for example it behaves like a SET function), it will define the functional global; then, when the dynamic Subvi execution stops, it releases the global functional VI. So if I call another sub - VI dynamic as a function of READING, he will not retain the information specified by SET Subvi.

    I'm not allowed to do the subVIs or global one functional dependence of handmade VI and it can not be compiled into the EXE file, so what I have to do is load the Subvi Dynamics somehow and either keep in memory even when the execution ends, or keep the functional global in memory after the first call.

    Anyone know how I would be able to do this?

    Help is appreciated,

    Drazen

    Drazen,

    When ' a VI dynamic calls functional overall for the first time, launch an another dynamic VI (Holder.vi) who has the functional overall as a Subvi.  Holder.VI does nothing except wait until the hand VI is called dynamic screws as long as Holder.vi is in memory, it will also keep the functional global in memory.

    I have not tried this, but think that it will work.  It of a little awkward, but must have a minimum size and impact on CPU resources.

    Lynn

  • What is the difference between HP Photo Creations and Snapfish

    I've been curious.

    What is the difference between HP Photo Creations and Snapfish?

    Hi Jeff17866. The difference between these two services are the location, accessibility and share-ability of the recorded images. Snapfish is a photo on the web edition and sharing and belonged to printing HP service. You upload your images on the Snapfish site and share with other sites (Facebook, Flickr, etc) by selecting the appropriate options. The images are then stored on the cloud, and you will be able to access it from any device with Internet access. So, if you want to easily share your photos with your friends and family around the country, Snapfish is a great tool to do. HP Photo Creations is a photo editing software that you download to your desktop. You can edit your photos and order prints just as with Snapfish, but all pictures remain on your hard drive. They can be shared by downloading files on the sites you want the images appear, but you are not able to access it on other devices. -Chauntain

  • VPN IPSEC ASA with counterpart with dynamic IP and certificates

    Hello!

    Someone please give me config the work of the ASA for ASA Site to Site IPSEC VPN with counterpart with dynamic IP and authentication certificates.

    He works with PSK authentication. But the connection landed at DefaultRAGroup instead of DefaultL2LGroup with certificate

    authentication.

    Should what special config I ask a DefaultRAGroup to activate the connection?

    Thank you!

    The ASA uses parts of the client cert DN to perform a tunnel-group  lookup to place the user in a group.  When "peer-id-validate req" is  defined the ASA also tries to compare the IKE ID (cert DN) with the  actual cert DN (also received in IKE negotiation), if the comparison  fails the connection fails. know you could set "peer-id-validate cert"  for the time being and the ASA will try to compare the values but allow  the connection if it cannot. 

    In general I would suggest using option "cert."

    With nocheck, we are simply not strict on IKE ID matchin the certificate, which is normally not a problem of security :-)

  • OpenSSL with 'Cisco VCS Certificate Creation and use - deployment guide. "

    Hi team,

    To prevent users to log on with the VCS Highway, we want to use OpenSSL (version: 1.0.1p 9 julio 2015), but I am facing the following problem:

    1 - I can't implement the command "touch index.txt".

    2 - I can´t implement the command "openssl genrsa-aes256-out private/cakey.pem 4096"; and when I apply these commands I get "OpenSSL is not recognized.

    I did all the steps that says "VCS certificate creation and use Cisco".

    What could be the matter?

    Thanks for your advice.

    Kind regards

    Bill

    Already explained why touch does not, simply create the .txt through windows command file.

  • The document has been changed since its creation and use of the extended functionality is no longer available

    I have Adobe Acrobat Reader DC 2015.016.20039 on my system. I filled a form using Foxit Reader. When I tried to open the form with Adobe Acrobat Reader DC I received the error "the document enabled extended in Adobe Acrobat Reader DC features. The document has been changed since its creation and use of the extended functionality is no longer available. Please contact the author for the original version of this document.

    I tried other PDF programs, no problem at the opening of this form.

    Ashampoo_Snap_2016.05.17_02h01m01s_002_.png

    Function "Activation reader" comes from the original shape, and it's essentially a digital signature. It is specific for the free product of Viewer PDF by Adobe (aka Adobe (Acrobat) Reader).

    The problem is that only Adobe products are able to (re) make these documents without breaking the seal of the digital signature.

    So, what happened in your case is the Foxit Viewer broke the seal during the recording of back and what's. Using Acrobat, you can save a copy of the form, and then continue will fill. Otherwise, you will be better off to start over, but stay with viewers Adobe PDF all the time, working with the form, or with a different Viewer, once again all the time you work with the shape.

    BTW, player XI and most recent no. have more need of extended for more rights blocked by previous versions of Reader. This is not enough in this case; only, it would be useful for the sender of the form.

    Update (after rereading of the original message): if it's just for viewing or print the form, you can ignore this message. You can also try to save just, you have a version of player who no longer has the rights extended (at your risk).

    I hope this can help.

  • I have a cloud of account creation and I want the last update for lightroom cc because I have a new camera the Olympus pen 7. Now, I can't open RAW images in lightroom cc my account number 800-832-6687 IRL (by payment)

    I have a cloud of account creation and I want the last update for lightroom cc because I have a new camera the Olympus pen 7. Now, I can't open RAW images in lightroom cc my account number 800-832-6687 IRL (by payment)

    Office CC lists the applications as "up to date" when they are not

    -http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html

    - and added the step https://forums.adobe.com/thread/1529654

  • create a digital identity and signature certificates approved as well as creation and appearance preferences.

    How to create a digital signature from the identity and approved certificates area, but they use the image of my real signature rather than the suburbs generated text? It would be combining all upward for the certificates and the creation and appearance options.

    Signing and trust certificates are generally different. Signing certificates are digital IDs and trust under certificates of trust. Although you can add a certificate to the signature of the certificate trust and there are cases where this is recommended, so that you will be able to use a certificate for signing (with key private and public) you must include it in the digital IDs. Most certificate in the approved identities have only the public key. Certificate without the private key cannot be used for signing.

  • Cannot get the digital signature that is added through the creation and the apparitions to be displayed in the list when you try to sign and certify

    I added a signature that appears under Appearance tab Creation and appearance of preference, but when I go to sign and certify a document, I can only find the digital ID created by guests when you try to sign a document. How can I find the signature I want under "appearances" and place it where it can be used to sign a document.

    Choose the appearance in the sign dialog box:

  • CC 2015 shows the updates available for the creation and Media Encoder, but fails to download/install them.

    CC 2015 shows the updates available for the creation and Media Encoder, but fails to download/install them. Generated the log shows "ERROR: DS015: cannot read the target of the symbolic link to the file source (...)" at the end.

    What am I supposed to do?

    Thank you, Carlo Romano

    Finally, what worked for me was to completely uninstall and reinstall both apps until 2015 for CC.

    Thanks a lot for the quick reply anyway.

    Carlo

  • The dynamic Types and Inventory Item Grouping

    Hello

    I'm provisioning different types of objects using dynamic Types and vCAC 6.1. In the tab "Items" vCAC, all objects of type dynamic are grouped under a kind of left, "Dynamic Types".

    For an example, I'm provisioning two dynamic types:

    -Volumes of block Vipr

    -View horizon 6 workstations

    If I set one of each of these types, they are both grouped under "Dynamic Types" in the agenda of the inventory tab. Is it possible to have all of these types under different groups? So, the volumes of vipr go "block Volumes; and work stations go under 'VDI Desktops'?

    I have attached a screenshot, and you can see that the volume 'Test vCO DT' block and the Office of vdi "Win7vCAC-v012" are both under the group "Dynamic Types" on the left. I want to separate these is easier for a user to view their items commissioned by type.

    I have custom resources defined for each of these dynamic types, but it still doesn't seem properly the group.

    Thank you

    Well, for someone who wants to know... you can do this via the DB unit.

    You need to add a new type of parent to the cat_resourcetype table, and then associate your custom and dynamic type in this same table with the parent in the parent_id field.

  • creation and assignment of tags in vCenter via vCO

    VMware is moving away from custom attributes and categories and tags.  Currently, vCO vCenter workflows for the creation of custom attributes, however, I found nothing on the automation of the creation and assignment of tags with virtual machines.

    Finally, I should mention the category via vCAC at the time of commissioning.  tag could be billing department as well as the response or if the tag exists (IE Engineering) and then he would associate the (engineering) tag to the category (dept billing).  However if the tag does not exist, then a new tag and associated with the virtual machine.

    thoughts?

    PowerShell commands

    Since version VMware PowerCLI 5.5R1 and until there are a number of commands for working with tags, such as:

    • Get - Tag
    • New-TagAssignment

    I had similar questions about the tags quite awhile (5.1 is released at the time).  I don't think I ever got a response.  In the meantime, you could create a wrapper for PowerCLI orders or make calls directly to the api.  A little messy but it would work.

  • Mobile site, automatic creation and editing

    I'm new to Muse and that you just created my first website which Im very satisfied. www.loosechippings.org BUT a big drawback for me is that I have to create a completely separate mobile site for smartphones. I like Weebly done automatically and direct mail automatically creates e-mail mobile format. Please Adobe may introduce the automatic creation and editing of mobile versions of Office web site?

    Take a look at a homepage of your choice and in my opinion, what happens, if you automatically translate this page completely in a layout of the phone. (quantity and size of the text, images, menus, anchors, pinning and so forth.) I think that, if you are aware of the horrible problems, you will never want to do this automatically.

Maybe you are looking for