question

Upvotes
Accepted
3 1 2 4

Adding Redi Type Library reference in Visual Studio 2013

Hi.

I am trying to get real-time market price feed (Level 1) via REDI API.

The version of REDI Plus I have installed is 16.1.0. I am using Visual Studio 2013 and trying to add a reference to the Redi 1.0 Type Library in a C# console application and getting an error attached in the screenshot.

I am guessing this might be a installation or configuration issue, but unable to put a finger on it.

Additionally, I have installed the Excel Add-In to be able to submit orders using the Excel macro file.

Any help would be appreciated. Please let me know if additional information is needed.

redi-apivisual-studio
image.png (41.8 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@mikez
Were you able to resolve the problem you experienced? If yes it would be great if you could share the solution you found on this thread. It would help other users who may experience similar issue. If the problem persists, did you get any further insight into the issue since the last post on this thread?

@Alex Putkov.

I have no new update as I am still waiting for a reply from Warren (Trading Specialist Support, Refinitiv) to setup a screenshare meeting to troubleshoot this issue...

Dear moderators,

Brian Mullane (product) was copied today, and he has included Warren via email

Hello @mikez

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,

AHS

Unfortunately this is still an outstanding issue. Haven't been able to get a meeting setup with REDI Plus support...

Hello @mikez,

Sorry to hear that.

Did you have a chance to remove, reinstall and re-config per Quickstart, as you were planning to?

Emailed PM, asked for an update.

Upvotes
Accepted
32.2k 40 11 20

Hello @mikez,

To help you to pinpoint the issue, have created an empty 2013 console project and added reference to my local redi.tlb to it.

I attach it here:

consoletest1.zip

You may be able to open it, and if no errors, remove the included reference to .redi.tlb and try adding back reference to .tlb in the local installation of your REDI Plus. The error may give further insight.


consoletest1.zip (63.6 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @zoya.farberov

After opening your console project I see this: image.png

On compiling I get following warning: compilation-warning.txt

So as per my very first message, looks like the component has not registered correctly during installation?

image.png (33.7 KiB)

Hi @mikez,

To confirm, you have removed my reference present, and added your tlb, from your REDI, prior to the compile? And the error has resulted on compiling with your locally installed and registered tlb?

Hi @zoya.farberov

No. The compilation warning is when I simply opened the project you provided and compiled. Your reference was NOT removed.

If I remove the reference and try to add again, I see the following error:

This is again the same as my message from "May 03 at 12:33 PM".

At this point, it feels like I am just going in circles trying to do the same thing over and over again, I feel that it would be really helpful to have a support call with screen sharing.

image.png (25.2 KiB)
Show more comments
Upvotes
32.2k 40 11 20

Hello @mikez,

Have you had a chance to see C# tutorials on monitoring L1 data

Getting Started in C#

and next

Monitoring L1 in C#

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
3 1 2 4

I am waiting for my request to be a family member to be approved. I was given some word documents for installing Redi and using the API in C#.

As part of using the API in C#, I am stuck at one of the initial steps of adding the Redi Type Library reference.

In addition to trying to add it from the COM section shown in the screenshot above, I have tried directly adding the Redi.tlb file in Redi installation folder and also the Redi.tlb that had been given to me in one of the emails. The message I get for those is that it is not a valid assembly or COM component.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@mikez

Have you installed registry settings (api.reg) for REDEPlus API? Please refer to Step 5 - Install API Package and Excel DDE Component in the REDIPlus & API Installation Guide.

@jirapongse.phuriphanvichai

I believe I had ran the registry settings file when the application was first setup on my machine.

Nevertheless, I followed "Step 5 - Install API Package and Excel DDE Component" from https://developers.refinitiv.com/transactions/redi-api/quick-start and installed the registry settings (api.reg) again.

The Redi Type Library COM component still has an issue.

Upvotes
3 1 2 4

@zoya.farberov I now have access to the link you posted - https://developers.refinitiv.com/transactions/redi-api/learning?content=55939&type=learning_material_item. But I am stuck on the first step where I am not able add the Redi 1.0 Type Library reference in Visual studio.

Adding the Redi.tlb directly fails with following message:


image.png (20.6 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @mikez,

In Windows Explorer, do you see .the tlb file within your local REDI installation?

Could you please verify that the path you are specifying in Visual Studio is correct for your local installation?

@zoya.farberov

Yes the path is correct, I have just deleted my name from the path from the image in my previous reply.The above error was after I selected the Redi.tlb file.

By the way, I noticed that there is a RediLib.dll, and when I add it, I seem to be able use the RediLib.CacheControl. Is that a recommended way of using the Redi library API?

With the regards to the root cause of the issue, is it probably that during the installation the registration of the Redi Type library COM component didn't happen correctly, which is why I am facing issues trying to add the reference?

@mikez,

The recommended is TLB that is within REDIPlus (not copied to the local project). It will be updated with future updates to your REDIPlus.

Have you followed REDI API Quickstart first?

Show more comments
Upvotes
32.2k 40 11 20

Hello @mikez,

If you see .tlb in your folder and are permissioned for it, you should be able to add .tlb as reference.

I would try removing RediLib from references, and next, adding back in by pointing to .tlb:

"Add Reference", browse to it, add it in. Please note, in properties it should appear as Interop.RediLib.dll, copied into your build.

Failing this, please contact your Refinitiv account team, to try to arrange to give you a hand.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Good morning @zoya.farberov

Yes, I have access to the Redi.tlb in the installation folder and have Admin permissions.

Per your steps, I removed the reference to the Redi dll and added the Redi.tlb manually, but am getting the same error as the on I posted on May 3.

I will check with the Redi support team again as I was directed here by them.

Thank you for looking into this.

Hello @mikez,

Have the issue been resolved outside of the forum?

If so, please let the community know, so other developers with similar questions may be led toward the solution?

Thanks

-AHS

Hello @zoya.farberov.

I followed up on the support thread on May 6th and today again. Got a reply that a session will be scheduled next week. So still waiting for the official solution for this issue.

Thanks.

Show more comments
Upvotes
3 1 2 4

Hi @zoya.farberov

As mentioned in my previous replies, I did try adding the TLB file multiple times using "Add reference -> COM-> browse to .tlb file". The error is shown in the image from May 3.

I am using .NET framework 4.5.2. I have also tried changing it to .NET framework 4.5 and .NET framework 4.4 with no luck.

PS: For some reason was not able to reply to your message, hence reply to the main question thread.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@mikez

(is possible to just Add->Browse, not specifying COM)

4.5 is good

For now, would use dll from REDI Tech\Primary folder, so you can integrate and not be held up, while dll you point to will remain consistent with REDI updates in the future.

@zoya.farberov

Yes, have also tried "(is possible to just Add->Browse, not specifying COM)", which gives the same error.

Sounds good, will be using .NET framework 4.5.2 for now.

Regarding - "For now, would use dll from REDI Tech\Primary folder, so you can integrate and not be held up, while dll you point to will remain consistent with REDI updates in the future.";

Do you mean use "RediLib.dll"?

FYI, the current version I have installed on my system is 11.0.123.4040.

Upvotes
3 1 2 4

@Alex Putkov.@zoya.farberov

As seen in the screenshot redilib-reference.png, I have added a reference to RediLib.dll and the "DisplayRediL1Quotes" code from https://github.com/TR-API-Samples/Example.REDI.CSharp.Examples/blob/master/REDIConsoleL1/RediConsoleL1.cs compiles fine.

When I try to run the code, I get a class not registered exception while trying to create an instance of CacheControl(). Attached is a txt file with the exception. redi-exception.txt

RediPlus is running on the same PC and I have logged in to it.

Any help would be appreciated as this is a critical issue for us now.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
32.2k 40 11 20

Hello @mikez,

Apologies for the delay, and thanks @Alex Putkov. for pointing this out, I did not look at the attachment closely.

Is your REDIPlus running?

The last error that you include, means that your REDIPlus is not running or the valid user is not logged in. To interact with REDIPlus via API it is required that REDIPlus be running or and a valid user be logged in.

This exact error I can reproduce.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@zoya.farberov @Alex Putkov.

Yes, REDIPlus is running and am logged in, on the same PC where I am trying to run the .NET console application. Please see the second last line of my June 4th message.

The error from the github sample code indicates that it is a general exception message for all exceptions of type COMException.

Also, I tried running the sample console app with direct reference to RediLib.dll in our production env., with the same REDIPlus user, and it seemed to work!

So will try re-installing REDIPlus on my local PC as it seems like an issue with the COM library registration.

Hi @mikez,

Did you have a chance to reinstall and re-register as per Quickstart?

How did it work for you after?

Hi @zoya.farberov

Thanks for checking.

Not yet, as Warren (trading support, Refinitiv) had asked for a time for a webex call with other members, I wanted to wait and troubleshoot this with them, assuming this is useful for the team.

I have a new machine and will try to install REDIPlus on it over the weekend.

Show more comments
Upvotes
32.2k 40 11 20

Hello @mikez,

Glad to hear it runs as expected in the production environment, suggest removing .dll reference, adding .tlb, rebuilding, and it should run too.

Absolutely agree with you. As the issue is specific to your environment, uninstalling and reinstalling REDIPlus (follow Quickstart to install addon and register DDE) is the right approach to fix this. Hopefully this will be it, if not, thinking, may be something missing or corrupted on the MSFT side, VS.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
32.2k 40 11 20

Hello @mikez,

Like to share some additional information on the error that you are seeing:

https://stackoverflow.com/questions/44019317/visual-studio-cant-reference-tlb-dll-anymore

Can you try registering as described, from an administrator command shell?

Let us know how it works for you.

Thanks

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

As suggested in the stackoverflow response, tried the 3rd option and output is attached.console-output.txt

Hi @mikez,

Do you have chance to follow up on the suggestion's Zoya regarding admin rights? Does the issue remain?

@mikez

You may need the local admin rights. I am not 100% sure, but "access denied" can be related to the unsufficient privileges. You may try to either obtain the local admin on this box and try again, with both REDIPlus and VS running in local admin space, or try on a different dev box, where the user has the local admin.

Hello @mikez,

Are you able to follow up on the suggestion?

Is this still relevant for you, or the matter is resolved otherwise?

Thanks,

-AHS

Hello @mikez,

Did you have a chance to follow up on the suggestion?

Does the issue remain relevant?

Thanks

@zoya.farberov I tried running the sample code on a local admin account after installing REDI Plus 19.1.0 and it worked. I verified that my domain account is a local Admin.

From our call, we had tried uninstalling, deleting some entries from windows registry, and then reinstalling REDI Plus 19.1.0, but to no avail. So at this point I am not entirely sure if there is some domain policy which is causing permission issues despite being a local admin or something else.

For now I will be using my local account for the development.

Thank you for all your help everyone!

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.