Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
error LNK1168: cannot open ...
No permission to create posts
April 15, 2016
6:36 pm
Avatar
Hairy
New Member
Members
Forum Posts: 1
Member Since:
March 30, 2016
sp_UserOfflineSmall Offline

First off, excellent book and software. I have been working through the audio plug-in projects with very few issues.

But recently, while creating a GUI for my Reverb Plug-in, I have been getting this error:
error LNK1168: cannot open C:\Users\MyName\AppData\Roaming\RackAFX\PlugIns\Reverb.dll for writing C:\RackAfx\Reverb\LINK

This happens after I: make a changes in the GUI Designer -> Update XML -> Unload Plug-in -> Rebuild in Visual Studio 2013. Pressing Rebuild in the RackAfx Program results in the same error. I discovered I could close RackAfx and the project would rebuild in VS fine. Then upon opening RackAfx everything works. The program loads quickly so this isn't a huge problem but it seems obvious that I'm doing something wrong here. Any light anyone could shed on this would be appreciated.

I'm in Windows 8.1, VS-2013 Ultimate, and RackAfx 6.6.4.1.

April 15, 2016
7:01 pm
Avatar
W Pirkle
Admin
Forum Posts: 140
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

When you use the GUI Designer, you must load your plugin. This happens with the LoadLibrary( ) function in Windows. When you unload the plugin (which is done automatically when you use the Rebuild button) I call the FreeLibrary( ) function. If your plugin does not properly unload with FreeLibrary( ) it gets hung in memory. There are generally two reasons that this happens - the first has to do with changing the plugin name string (you can find that in your derived class constructor) -- some of my students have accidentally done this when trying to cut and paste code from one project to another.

The second and more common reason is that something in your code is hooking memory and the DLL is not unloading properly. This is often due to an error in the destructor code, or hanging memory in some other way (new/delete or malloc/free).

Unfortunately, the FreeLibrary( ) function almost always returns TRUE even if the plugin does not unload so you don't get a warning from RackAFX when this happens.

EDIT: FYI the only thing the GUI Designer changes is the XML file in your project named RackAFX.uidesc; the GUI Designer is actually really an XML reader/writer. It does not alter any other files or link to any libraries.

- Will

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online: W Pirkle
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Derek: 41

Peter: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 478

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 29

Topics: 479

Posts: 1870

Newest Members:

certvalue111, sobhana s, sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 140

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 140