Please consider registering

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
New Member
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

April 15, 2016
7:01 pm
W Pirkle
Forum Posts: 259
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

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: 55

Currently Online:
13 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Peter: 41

Frodson: 40

clau_ste: 39

Gwen: 32

JimmyM: 30

TheSmile: 28

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 525

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 31

Topics: 550

Posts: 2158

Newest Members:

LamebrainEddy, SteveThackery, rawbirdtoe, Bill, hill william, NAUN_SONAR, sufy, Diane, Richard, drvenkman

Moderators: W Pirkle: 259

Administrators: Tom: 67, JD Young: 80, Will Pirkle: 0, W Pirkle: 259